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

Side by Side Diff: src/factory.h

Issue 505303004: Ensure that JSProxy::Fix gives the generated JSObject map a constructor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « no previous file | src/factory.cc » ('j') | src/factory.cc » ('J')
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 "src/isolate.h" 8 #include "src/isolate.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 // Allocates a Harmony proxy. 443 // Allocates a Harmony proxy.
444 Handle<JSProxy> NewJSProxy(Handle<Object> handler, Handle<Object> prototype); 444 Handle<JSProxy> NewJSProxy(Handle<Object> handler, Handle<Object> prototype);
445 445
446 // Allocates a Harmony function proxy. 446 // Allocates a Harmony function proxy.
447 Handle<JSProxy> NewJSFunctionProxy(Handle<Object> handler, 447 Handle<JSProxy> NewJSFunctionProxy(Handle<Object> handler,
448 Handle<Object> call_trap, 448 Handle<Object> call_trap,
449 Handle<Object> construct_trap, 449 Handle<Object> construct_trap,
450 Handle<Object> prototype); 450 Handle<Object> prototype);
451 451
452 // Reinitialize a JSReceiver into an (empty) JS object of respective type and
453 // size, but keeping the original prototype. The receiver must have at least
454 // the size of the new object. The object is reinitialized and behaves as an
455 // object that has been freshly allocated.
456 void ReinitializeJSReceiver(
457 Handle<JSReceiver> object, InstanceType type, int size);
458
459 // Reinitialize an JSGlobalProxy based on a constructor. The object 452 // Reinitialize an JSGlobalProxy based on a constructor. The object
460 // must have the same size as objects allocated using the 453 // must have the same size as objects allocated using the
461 // constructor. The object is reinitialized and behaves as an 454 // constructor. The object is reinitialized and behaves as an
462 // object that has been freshly allocated using the constructor. 455 // object that has been freshly allocated using the constructor.
463 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global, 456 void ReinitializeJSGlobalProxy(Handle<JSGlobalProxy> global,
464 Handle<JSFunction> constructor); 457 Handle<JSFunction> constructor);
465 458
466 // Change the type of the argument into a JS object/function and reinitialize. 459 // Change the type of the argument into a JS object/function and reinitialize.
467 void BecomeJSObject(Handle<JSReceiver> object); 460 void BecomeJSObject(Handle<JSProxy> object);
468 void BecomeJSFunction(Handle<JSReceiver> object); 461 void BecomeJSFunction(Handle<JSProxy> object);
469 462
470 Handle<JSFunction> NewFunction(Handle<String> name, 463 Handle<JSFunction> NewFunction(Handle<String> name,
471 Handle<Code> code, 464 Handle<Code> code,
472 Handle<Object> prototype, 465 Handle<Object> prototype,
473 bool read_only_prototype = false); 466 bool read_only_prototype = false);
474 Handle<JSFunction> NewFunction(Handle<String> name); 467 Handle<JSFunction> NewFunction(Handle<String> name);
475 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name, 468 Handle<JSFunction> NewFunctionWithoutPrototype(Handle<String> name,
476 Handle<Code> code); 469 Handle<Code> code);
477 470
478 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( 471 Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 693
701 // Creates a function initialized with a shared part. 694 // Creates a function initialized with a shared part.
702 Handle<JSFunction> NewFunction(Handle<Map> map, 695 Handle<JSFunction> NewFunction(Handle<Map> map,
703 Handle<SharedFunctionInfo> info, 696 Handle<SharedFunctionInfo> info,
704 Handle<Context> context, 697 Handle<Context> context,
705 PretenureFlag pretenure = TENURED); 698 PretenureFlag pretenure = TENURED);
706 699
707 Handle<JSFunction> NewFunction(Handle<Map> map, 700 Handle<JSFunction> NewFunction(Handle<Map> map,
708 Handle<String> name, 701 Handle<String> name,
709 MaybeHandle<Code> maybe_code); 702 MaybeHandle<Code> maybe_code);
703
704 // Reinitialize a JSProxy into an (empty) JS object of respective type and
705 // size, but keeping the original prototype. The receiver must have at least
706 // the size of the new object. The object is reinitialized and behaves as an
707 // object that has been freshly allocated.
708 void ReinitializeJSProxy(Handle<JSProxy> proxy, InstanceType type, int size);
adamk 2014/08/26 22:10:53 I made this private since the only callers are Bec
710 }; 709 };
711 710
712 } } // namespace v8::internal 711 } } // namespace v8::internal
713 712
714 #endif // V8_FACTORY_H_ 713 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | src/factory.cc » ('j') | src/factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698