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/factory.h

Issue 238773009: Set code on the SharedFunctionInfo before creating the function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_FACTORY_H_ 5 #ifndef V8_FACTORY_H_
6 #define V8_FACTORY_H_ 6 #define V8_FACTORY_H_
7 7
8 #include "isolate.h" 8 #include "isolate.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // constructor. The object is reinitialized and behaves as an 414 // constructor. The object is reinitialized and behaves as an
415 // object that has been freshly allocated using the constructor. 415 // object that has been freshly allocated using the constructor.
416 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, 416 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global,
417 Handle<JSFunction> constructor); 417 Handle<JSFunction> constructor);
418 418
419 // Change the type of the argument into a JS object/function and reinitialize. 419 // Change the type of the argument into a JS object/function and reinitialize.
420 void BecomeJSObject(Handle<JSReceiver> object); 420 void BecomeJSObject(Handle<JSReceiver> object);
421 void BecomeJSFunction(Handle<JSReceiver> object); 421 void BecomeJSFunction(Handle<JSReceiver> object);
422 422
423 Handle<JSFunction> NewFunction(Handle<String> name, 423 Handle<JSFunction> NewFunction(Handle<String> name,
424 Handle<Object> prototype); 424 Handle<Code> code,
425 MaybeHandle<Object> maybe_prototype =
426 MaybeHandle<Object>());
427
428 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name,
429 Handle<Object> prototype);
425 430
426 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( 431 Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
427 Handle<SharedFunctionInfo> function_info, 432 Handle<SharedFunctionInfo> function_info,
428 Handle<Context> context, 433 Handle<Context> context,
429 PretenureFlag pretenure = TENURED); 434 PretenureFlag pretenure = TENURED);
430 435
431 Handle<JSFunction> NewFunction(Handle<String> name, 436 Handle<JSFunction> NewFunction(Handle<String> name,
432 InstanceType type, 437 InstanceType type,
433 int instance_size, 438 int instance_size,
434 Handle<Code> code, 439 Handle<Code> code,
435 bool force_initial_map); 440 bool force_initial_map);
436 441
437 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name, 442 Handle<JSFunction> NewFunctionWithPrototype(Handle<String> name,
438 InstanceType type, 443 InstanceType type,
439 int instance_size, 444 int instance_size,
440 Handle<JSObject> prototype, 445 Handle<JSObject> prototype,
441 Handle<Code> code, 446 Handle<Code> code,
442 bool force_initial_map); 447 bool force_initial_map);
443 448
444 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name,
445 Handle<Code> code);
446
447 // Create a serialized scope info. 449 // Create a serialized scope info.
448 Handle<ScopeInfo> NewScopeInfo(int length); 450 Handle<ScopeInfo> NewScopeInfo(int length);
449 451
450 // Create an External object for V8's external API. 452 // Create an External object for V8's external API.
451 Handle<JSObject> NewExternal(void* value); 453 Handle<JSObject> NewExternal(void* value);
452 454
453 // The reference to the Code object is stored in self_reference. 455 // The reference to the Code object is stored in self_reference.
454 // This allows generated code to reference its own Code object 456 // This allows generated code to reference its own Code object
455 // by containing this handle. 457 // by containing this handle.
456 Handle<Code> NewCode(const CodeDesc& desc, 458 Handle<Code> NewCode(const CodeDesc& desc,
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 // the string representation of the number. Otherwise return undefined. 658 // the string representation of the number. Otherwise return undefined.
657 Handle<Object> GetNumberStringCache(Handle<Object> number); 659 Handle<Object> GetNumberStringCache(Handle<Object> number);
658 660
659 // Update the cache with a new number-string pair. 661 // Update the cache with a new number-string pair.
660 void SetNumberStringCache(Handle<Object> number, Handle<String> string); 662 void SetNumberStringCache(Handle<Object> number, Handle<String> string);
661 }; 663 };
662 664
663 } } // namespace v8::internal 665 } } // namespace v8::internal
664 666
665 #endif // V8_FACTORY_H_ 667 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698