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

Side by Side Diff: src/factory.cc

Issue 27267: Experimental: periodic merge from the bleeding edge branch to the code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 9 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/factory.h ('k') | src/flag-definitions.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Set function.prototype and give the prototype a constructor 480 // Set function.prototype and give the prototype a constructor
481 // property that refers to the function. 481 // property that refers to the function.
482 SetPrototypeProperty(function, prototype); 482 SetPrototypeProperty(function, prototype);
483 SetProperty(prototype, Factory::constructor_symbol(), function, DONT_ENUM); 483 SetProperty(prototype, Factory::constructor_symbol(), function, DONT_ENUM);
484 return function; 484 return function;
485 } 485 }
486 486
487 487
488 Handle<Code> Factory::NewCode(const CodeDesc& desc, ScopeInfo<>* sinfo, 488 Handle<Code> Factory::NewCode(const CodeDesc& desc, ScopeInfo<>* sinfo,
489 Code::Flags flags, Handle<Object> self_ref) { 489 Code::Flags flags, Handle<Object> self_ref) {
490 CALL_HEAP_FUNCTION(Heap::CreateCode( 490 CALL_HEAP_FUNCTION(Heap::CreateCode(desc, sinfo, flags, self_ref), Code);
491 desc, sinfo, flags, reinterpret_cast<Code**>(self_ref.location())), Code);
492 }
493
494 Handle<Code> Factory::NewCode(const CodeDesc& desc, ScopeInfo<>* sinfo,
495 Code::Flags flags) {
496 CALL_HEAP_FUNCTION(Heap::CreateCode(desc, sinfo, flags, NULL), Code);
497 } 491 }
498 492
499 493
500 Handle<Code> Factory::CopyCode(Handle<Code> code) { 494 Handle<Code> Factory::CopyCode(Handle<Code> code) {
501 CALL_HEAP_FUNCTION(Heap::CopyCode(*code), Code); 495 CALL_HEAP_FUNCTION(Heap::CopyCode(*code), Code);
502 } 496 }
503 497
504 498
505 static inline Object* DoCopyInsert(DescriptorArray* array, 499 static inline Object* DoCopyInsert(DescriptorArray* array,
506 String* key, 500 String* key,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 CALL_HEAP_FUNCTION(Heap::AllocateJSObject(*constructor, pretenure), JSObject); 588 CALL_HEAP_FUNCTION(Heap::AllocateJSObject(*constructor, pretenure), JSObject);
595 } 589 }
596 590
597 591
598 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) { 592 Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) {
599 CALL_HEAP_FUNCTION(Heap::AllocateJSObjectFromMap(*map, NOT_TENURED), 593 CALL_HEAP_FUNCTION(Heap::AllocateJSObjectFromMap(*map, NOT_TENURED),
600 JSObject); 594 JSObject);
601 } 595 }
602 596
603 597
604 Handle<JSArray> Factory::NewArrayLiteral(int length) {
605 return NewJSArrayWithElements(NewFixedArray(length), TENURED);
606 }
607
608
609 Handle<JSArray> Factory::NewJSArray(int length, 598 Handle<JSArray> Factory::NewJSArray(int length,
610 PretenureFlag pretenure) { 599 PretenureFlag pretenure) {
611 Handle<JSObject> obj = NewJSObject(Top::array_function(), pretenure); 600 Handle<JSObject> obj = NewJSObject(Top::array_function(), pretenure);
612 CALL_HEAP_FUNCTION(Handle<JSArray>::cast(obj)->Initialize(length), JSArray); 601 CALL_HEAP_FUNCTION(Handle<JSArray>::cast(obj)->Initialize(length), JSArray);
613 } 602 }
614 603
615 604
616 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements, 605 Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements,
617 PretenureFlag pretenure) { 606 PretenureFlag pretenure) {
618 Handle<JSArray> result = 607 Handle<JSArray> result =
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 Execution::ConfigureInstance(instance, 850 Execution::ConfigureInstance(instance,
862 instance_template, 851 instance_template,
863 pending_exception); 852 pending_exception);
864 } else { 853 } else {
865 *pending_exception = false; 854 *pending_exception = false;
866 } 855 }
867 } 856 }
868 857
869 858
870 } } // namespace v8::internal 859 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698