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

Side by Side Diff: src/factory.cc

Issue 10876067: Introduce global contexts to represent lexical global scope(s). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Sven's comments. Created 8 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 | « src/factory.h ('k') | src/heap.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 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 286
287 Handle<Context> Factory::NewNativeContext() { 287 Handle<Context> Factory::NewNativeContext() {
288 CALL_HEAP_FUNCTION( 288 CALL_HEAP_FUNCTION(
289 isolate(), 289 isolate(),
290 isolate()->heap()->AllocateNativeContext(), 290 isolate()->heap()->AllocateNativeContext(),
291 Context); 291 Context);
292 } 292 }
293 293
294 294
295 Handle<Context> Factory::NewGlobalContext(Handle<JSFunction> function,
296 Handle<ScopeInfo> scope_info) {
297 CALL_HEAP_FUNCTION(
298 isolate(),
299 isolate()->heap()->AllocateGlobalContext(*function, *scope_info),
300 Context);
301 }
302
303
295 Handle<Context> Factory::NewModuleContext(Handle<ScopeInfo> scope_info) { 304 Handle<Context> Factory::NewModuleContext(Handle<ScopeInfo> scope_info) {
296 CALL_HEAP_FUNCTION( 305 CALL_HEAP_FUNCTION(
297 isolate(), 306 isolate(),
298 isolate()->heap()->AllocateModuleContext(*scope_info), 307 isolate()->heap()->AllocateModuleContext(*scope_info),
299 Context); 308 Context);
300 } 309 }
301 310
302 311
303 Handle<Context> Factory::NewFunctionContext(int length, 312 Handle<Context> Factory::NewFunctionContext(int length,
304 Handle<JSFunction> function) { 313 Handle<JSFunction> function) {
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1409
1401 1410
1402 Handle<Object> Factory::ToBoolean(bool value) { 1411 Handle<Object> Factory::ToBoolean(bool value) {
1403 return Handle<Object>(value 1412 return Handle<Object>(value
1404 ? isolate()->heap()->true_value() 1413 ? isolate()->heap()->true_value()
1405 : isolate()->heap()->false_value()); 1414 : isolate()->heap()->false_value());
1406 } 1415 }
1407 1416
1408 1417
1409 } } // namespace v8::internal 1418 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698