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

Side by Side Diff: src/factory.cc

Issue 132963012: Pretenure call new support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 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/hydrogen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 1320
1321 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor, 1321 Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor,
1322 PretenureFlag pretenure) { 1322 PretenureFlag pretenure) {
1323 JSFunction::EnsureHasInitialMap(constructor); 1323 JSFunction::EnsureHasInitialMap(constructor);
1324 CALL_HEAP_FUNCTION( 1324 CALL_HEAP_FUNCTION(
1325 isolate(), 1325 isolate(),
1326 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject); 1326 isolate()->heap()->AllocateJSObject(*constructor, pretenure), JSObject);
1327 } 1327 }
1328 1328
1329 1329
1330 Handle<JSObject> Factory::NewJSObjectWithMemento(
1331 Handle<JSFunction> constructor,
1332 Handle<AllocationSite> site) {
1333 JSFunction::EnsureHasInitialMap(constructor);
1334 CALL_HEAP_FUNCTION(
1335 isolate(),
1336 isolate()->heap()->AllocateJSObject(*constructor, NOT_TENURED, *site),
1337 JSObject);
1338 }
1339
1340
1330 Handle<JSModule> Factory::NewJSModule(Handle<Context> context, 1341 Handle<JSModule> Factory::NewJSModule(Handle<Context> context,
1331 Handle<ScopeInfo> scope_info) { 1342 Handle<ScopeInfo> scope_info) {
1332 CALL_HEAP_FUNCTION( 1343 CALL_HEAP_FUNCTION(
1333 isolate(), 1344 isolate(),
1334 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule); 1345 isolate()->heap()->AllocateJSModule(*context, *scope_info), JSModule);
1335 } 1346 }
1336 1347
1337 1348
1338 // TODO(mstarzinger): Temporary wrapper until handlified. 1349 // TODO(mstarzinger): Temporary wrapper until handlified.
1339 static Handle<NameDictionary> NameDictionaryAdd(Handle<NameDictionary> dict, 1350 static Handle<NameDictionary> NameDictionaryAdd(Handle<NameDictionary> dict,
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
2023 return Handle<Object>::null(); 2034 return Handle<Object>::null();
2024 } 2035 }
2025 2036
2026 2037
2027 Handle<Object> Factory::ToBoolean(bool value) { 2038 Handle<Object> Factory::ToBoolean(bool value) {
2028 return value ? true_value() : false_value(); 2039 return value ? true_value() : false_value();
2029 } 2040 }
2030 2041
2031 2042
2032 } } // namespace v8::internal 2043 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698