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

Side by Side Diff: src/bootstrapper.cc

Issue 10854116: Remove prototype of global builtins object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 | test/mjsunit/regress/regress-2284.js » ('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 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1426 Handle<Code> code = Handle<Code>( 1426 Handle<Code> code = Handle<Code>(
1427 isolate()->builtins()->builtin(Builtins::kIllegal)); 1427 isolate()->builtins()->builtin(Builtins::kIllegal));
1428 Handle<JSFunction> builtins_fun = 1428 Handle<JSFunction> builtins_fun =
1429 factory()->NewFunction(factory()->empty_symbol(), 1429 factory()->NewFunction(factory()->empty_symbol(),
1430 JS_BUILTINS_OBJECT_TYPE, 1430 JS_BUILTINS_OBJECT_TYPE,
1431 JSBuiltinsObject::kSize, code, true); 1431 JSBuiltinsObject::kSize, code, true);
1432 1432
1433 Handle<String> name = factory()->LookupAsciiSymbol("builtins"); 1433 Handle<String> name = factory()->LookupAsciiSymbol("builtins");
1434 builtins_fun->shared()->set_instance_class_name(*name); 1434 builtins_fun->shared()->set_instance_class_name(*name);
1435 builtins_fun->initial_map()->set_dictionary_map(true); 1435 builtins_fun->initial_map()->set_dictionary_map(true);
1436 builtins_fun->initial_map()->set_prototype(heap()->null_value());
1436 1437
1437 // Allocate the builtins object. 1438 // Allocate the builtins object.
1438 Handle<JSBuiltinsObject> builtins = 1439 Handle<JSBuiltinsObject> builtins =
1439 Handle<JSBuiltinsObject>::cast(factory()->NewGlobalObject(builtins_fun)); 1440 Handle<JSBuiltinsObject>::cast(factory()->NewGlobalObject(builtins_fun));
1440 builtins->set_builtins(*builtins); 1441 builtins->set_builtins(*builtins);
1441 builtins->set_global_context(*global_context()); 1442 builtins->set_global_context(*global_context());
1442 builtins->set_global_receiver(*builtins); 1443 builtins->set_global_receiver(*builtins);
1443 1444
1444 // Set up the 'global' properties of the builtins object. The 1445 // Set up the 'global' properties of the builtins object. The
1445 // 'global' property that refers to the global object is the only 1446 // 'global' property that refers to the global object is the only
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 return from + sizeof(NestingCounterType); 2389 return from + sizeof(NestingCounterType);
2389 } 2390 }
2390 2391
2391 2392
2392 // Called when the top-level V8 mutex is destroyed. 2393 // Called when the top-level V8 mutex is destroyed.
2393 void Bootstrapper::FreeThreadResources() { 2394 void Bootstrapper::FreeThreadResources() {
2394 ASSERT(!IsActive()); 2395 ASSERT(!IsActive());
2395 } 2396 }
2396 2397
2397 } } // namespace v8::internal 2398 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2284.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698