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

Side by Side Diff: src/bootstrapper.cc

Issue 844006: Merge changes up to V8 version 2.1.3 into the partial snapshots (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 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/ast.cc ('k') | src/builtins.cc » ('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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 common_attributes); 1101 common_attributes);
1102 1102
1103 Handle<Map> script_map = Handle<Map>(script_fun->initial_map()); 1103 Handle<Map> script_map = Handle<Map>(script_fun->initial_map());
1104 script_map->set_instance_descriptors(*script_descriptors); 1104 script_map->set_instance_descriptors(*script_descriptors);
1105 1105
1106 // Allocate the empty script. 1106 // Allocate the empty script.
1107 Handle<Script> script = Factory::NewScript(Factory::empty_string()); 1107 Handle<Script> script = Factory::NewScript(Factory::empty_string());
1108 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); 1108 script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
1109 Heap::public_set_empty_script(*script); 1109 Heap::public_set_empty_script(*script);
1110 } 1110 }
1111 {
1112 // Builtin function for OpaqueReference -- a JSValue-based object,
1113 // that keeps its field isolated from JavaScript code. It may store
1114 // objects, that JavaScript code may not access.
1115 Handle<JSFunction> opaque_reference_fun =
1116 InstallFunction(builtins, "OpaqueReference", JS_VALUE_TYPE,
1117 JSValue::kSize, Top::initial_object_prototype(),
1118 Builtins::Illegal, false);
1119 Handle<JSObject> prototype =
1120 Factory::NewJSObject(Top::object_function(), TENURED);
1121 SetPrototype(opaque_reference_fun, prototype);
1122 global_context()->set_opaque_reference_function(*opaque_reference_fun);
1123 }
1111 1124
1112 // Install natives. 1125 // Install natives.
1113 for (int i = Natives::GetDebuggerCount(); 1126 for (int i = Natives::GetDebuggerCount();
1114 i < Natives::GetBuiltinsCount(); 1127 i < Natives::GetBuiltinsCount();
1115 i++) { 1128 i++) {
1116 Vector<const char> name = Natives::GetScriptName(i); 1129 Vector<const char> name = Natives::GetScriptName(i);
1117 if (!CompileBuiltin(i)) return false; 1130 if (!CompileBuiltin(i)) return false;
1118 // TODO(ager): We really only need to install the JS builtin 1131 // TODO(ager): We really only need to install the JS builtin
1119 // functions on the builtins object after compiling and running 1132 // functions on the builtins object after compiling and running
1120 // runtime.js. 1133 // runtime.js.
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 } 1651 }
1639 1652
1640 1653
1641 // Restore statics that are thread local. 1654 // Restore statics that are thread local.
1642 char* BootstrapperActive::RestoreState(char* from) { 1655 char* BootstrapperActive::RestoreState(char* from) {
1643 nesting_ = *reinterpret_cast<int*>(from); 1656 nesting_ = *reinterpret_cast<int*>(from);
1644 return from + sizeof(nesting_); 1657 return from + sizeof(nesting_);
1645 } 1658 }
1646 1659
1647 } } // namespace v8::internal 1660 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698