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

Unified Diff: src/handles.cc

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/handles.h ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles.cc
===================================================================
--- src/handles.cc (revision 4210)
+++ src/handles.cc (working copy)
@@ -174,13 +174,6 @@
}
-void SetExpectedNofPropertiesFromEstimate(Handle<JSFunction> func,
- int estimate) {
- SetExpectedNofProperties(
- func, ExpectedNofPropertiesFromEstimate(estimate));
-}
-
-
void NormalizeProperties(Handle<JSObject> object,
PropertyNormalizationMode mode,
int expected_additional_properties) {
@@ -796,29 +789,32 @@
Vector<const char> name = Natives::GetScriptName(index);
- Handle<JSFunction> boilerplate;
+ Handle<SharedFunctionInfo> function_info;
- if (!Bootstrapper::NativesCacheLookup(name, &boilerplate)) {
+ if (!Bootstrapper::NativesCacheLookup(name, &function_info)) {
Handle<String> source_code = Bootstrapper::NativesSourceLookup(index);
Handle<String> script_name = Factory::NewStringFromAscii(name);
bool allow_natives_syntax = FLAG_allow_natives_syntax;
FLAG_allow_natives_syntax = true;
- boilerplate = Compiler::Compile(source_code, script_name, 0, 0, NULL, NULL,
- Handle<String>::null(), NATIVES_CODE);
+ function_info = Compiler::Compile(source_code,
+ script_name,
+ 0, 0, NULL, NULL,
+ Handle<String>::null(),
+ NATIVES_CODE);
FLAG_allow_natives_syntax = allow_natives_syntax;
// If the compilation failed (possibly due to stack overflows), we
// should never enter the result in the natives cache. Instead we
// return from the function without marking the function as having
// been lazily loaded.
- if (boilerplate.is_null()) {
+ if (function_info.is_null()) {
*pending_exception = true;
return;
}
- Bootstrapper::NativesCacheAdd(name, boilerplate);
+ Bootstrapper::NativesCacheAdd(name, function_info);
}
// We shouldn't get here if compiling the script failed.
- ASSERT(!boilerplate.is_null());
+ ASSERT(!function_info.is_null());
#ifdef ENABLE_DEBUGGER_SUPPORT
// When the debugger running in its own context touches lazy loaded
@@ -838,7 +834,8 @@
// Run the script.
Handle<JSFunction> script_fun(
- Factory::NewFunctionFromBoilerplate(boilerplate, function_context));
+ Factory::NewFunctionFromSharedFunctionInfo(function_info,
+ function_context));
Execution::Call(script_fun, receiver, 0, NULL, pending_exception);
// If lazy loading failed, restore the unloaded state of obj.
« no previous file with comments | « src/handles.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698