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

Unified Diff: src/runtime.cc

Issue 27267: Experimental: periodic merge from the bleeding edge branch to the code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 10 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/runtime.h ('k') | src/scopeinfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 1380)
+++ src/runtime.cc (working copy)
@@ -2151,6 +2151,22 @@
}
+static Object* Runtime_ToFastProperties(Arguments args) {
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_CHECKED(JSObject, object, 0);
+ object->TransformToFastProperties(0);
+ return *object;
+}
+
+
+static Object* Runtime_ToSlowProperties(Arguments args) {
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_CHECKED(JSObject, object, 0);
+ object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES);
+ return *object;
+}
+
+
static Object* Runtime_ToBool(Arguments args) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
@@ -4007,11 +4023,11 @@
CONVERT_ARG_CHECKED(String, source, 0);
CONVERT_ARG_CHECKED(Smi, line_offset, 1);
- // Compile source string.
+ // Compile source string in the global context.
+ Handle<Context> context(Top::context()->global_context());
Handle<JSFunction> boilerplate =
- Compiler::CompileEval(source, line_offset->value(), true);
+ Compiler::CompileEval(source, context, line_offset->value(), true);
if (boilerplate.is_null()) return Failure::Exception();
- Handle<Context> context(Top::context()->global_context());
Handle<JSFunction> fun =
Factory::NewFunctionFromBoilerplate(boilerplate, context);
return *fun;
@@ -4033,8 +4049,9 @@
Handle<Context> context(Context::cast(frame->context()));
bool is_global = context->IsGlobalContext();
- // Compile source string.
- Handle<JSFunction> boilerplate = Compiler::CompileEval(source, 0, is_global);
+ // Compile source string in the current context.
+ Handle<JSFunction> boilerplate =
+ Compiler::CompileEval(source, context, 0, is_global);
if (boilerplate.is_null()) return Failure::Exception();
Handle<JSFunction> fun =
Factory::NewFunctionFromBoilerplate(boilerplate, context);
@@ -5014,13 +5031,13 @@
Handle<Object> frame_id(WrapFrameId(it.frame()->id()));
// Find source position.
- int position = it.frame()->FindCode()->SourcePosition(it.frame()->pc());
+ int position = it.frame()->code()->SourcePosition(it.frame()->pc());
// Check for constructor frame.
bool constructor = it.frame()->IsConstructor();
// Get code and read scope info from it for local variable information.
- Handle<Code> code(it.frame()->FindCode());
+ Handle<Code> code(it.frame()->code());
ScopeInfo<> info(*code);
// Get the context.
@@ -5594,7 +5611,10 @@
Factory::NewStringFromAscii(Vector<const char>(source_str,
source_str_length));
Handle<JSFunction> boilerplate =
- Compiler::CompileEval(function_source, 0, context->IsGlobalContext());
+ Compiler::CompileEval(function_source,
+ context,
+ 0,
+ context->IsGlobalContext());
if (boilerplate.is_null()) return Failure::Exception();
Handle<JSFunction> compiled_function =
Factory::NewFunctionFromBoilerplate(boilerplate, context);
@@ -5651,7 +5671,8 @@
Handle<Context> context = Top::global_context();
// Compile the source to be evaluated.
- Handle<JSFunction> boilerplate(Compiler::CompileEval(source, 0, true));
+ Handle<JSFunction> boilerplate =
+ Handle<JSFunction>(Compiler::CompileEval(source, context, 0, true));
if (boilerplate.is_null()) return Failure::Exception();
Handle<JSFunction> compiled_function =
Handle<JSFunction>(Factory::NewFunctionFromBoilerplate(boilerplate,
« no previous file with comments | « src/runtime.h ('k') | src/scopeinfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698