Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/runtime.cc

Issue 14912002: toString() on generator functions prints with function* (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Remove TODO Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after
2182 2182
2183 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) { 2183 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionMarkNameShouldPrintAsAnonymous) {
2184 NoHandleAllocation ha(isolate); 2184 NoHandleAllocation ha(isolate);
2185 ASSERT(args.length() == 1); 2185 ASSERT(args.length() == 1);
2186 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2186 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2187 f->shared()->set_name_should_print_as_anonymous(true); 2187 f->shared()->set_name_should_print_as_anonymous(true);
2188 return isolate->heap()->undefined_value(); 2188 return isolate->heap()->undefined_value();
2189 } 2189 }
2190 2190
2191 2191
2192 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionIsGenerator) {
2193 NoHandleAllocation ha(isolate);
2194 ASSERT(args.length() == 1);
2195 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2196 return isolate->heap()->ToBoolean(f->shared()->is_generator());
2197 }
2198
2199
2192 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) { 2200 RUNTIME_FUNCTION(MaybeObject*, Runtime_FunctionRemovePrototype) {
2193 NoHandleAllocation ha(isolate); 2201 NoHandleAllocation ha(isolate);
2194 ASSERT(args.length() == 1); 2202 ASSERT(args.length() == 1);
2195 2203
2196 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2204 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2197 f->RemovePrototype(); 2205 f->RemovePrototype();
2198 2206
2199 return isolate->heap()->undefined_value(); 2207 return isolate->heap()->undefined_value();
2200 } 2208 }
2201 2209
(...skipping 11175 matching lines...) Expand 10 before | Expand all | Expand 10 after
13377 // Handle last resort GC and make sure to allow future allocations 13385 // Handle last resort GC and make sure to allow future allocations
13378 // to grow the heap without causing GCs (if possible). 13386 // to grow the heap without causing GCs (if possible).
13379 isolate->counters()->gc_last_resort_from_js()->Increment(); 13387 isolate->counters()->gc_last_resort_from_js()->Increment();
13380 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13388 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13381 "Runtime::PerformGC"); 13389 "Runtime::PerformGC");
13382 } 13390 }
13383 } 13391 }
13384 13392
13385 13393
13386 } } // namespace v8::internal 13394 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698