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

Unified Diff: src/runtime.cc

Issue 173349: Reverting 2753. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.h ('k') | src/stub-cache.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 2753)
+++ src/runtime.cc (working copy)
@@ -45,7 +45,6 @@
#include "v8threads.h"
#include "smart-pointer.h"
#include "parser.h"
-#include "stub-cache.h"
namespace v8 {
namespace internal {
@@ -1236,9 +1235,6 @@
// Array, and Object, and some web code
// doesn't like seeing source code for constructors.
target->shared()->set_script(Heap::undefined_value());
- // Clear the optimization hints related to the compiled code as these are no
- // longer valid when the code is overwritten.
- target->shared()->ClearThisPropertyAssignmentsInfo();
context = Handle<Context>(fun->context());
// Make sure we get a fresh copy of the literal vector to avoid
@@ -4330,21 +4326,11 @@
}
-static Code* ComputeConstructStub(Handle<SharedFunctionInfo> shared) {
+static Handle<Code> ComputeConstructStub(Handle<Map> map) {
// TODO(385): Change this to create a construct stub specialized for
// the given map to make allocation of simple objects - and maybe
// arrays - much faster.
- if (FLAG_inline_new
- && shared->has_only_simple_this_property_assignments()) {
- ConstructStubCompiler compiler;
- Object* code = compiler.CompileConstructStub(*shared);
- if (code->IsFailure()) {
- return Builtins::builtin(Builtins::JSConstructStubGeneric);
- }
- return Code::cast(code);
- }
-
- return Builtins::builtin(Builtins::JSConstructStubGeneric);
+ return Handle<Code>(Builtins::builtin(Builtins::JSConstructStubGeneric));
}
@@ -4387,25 +4373,15 @@
}
}
- // The function should be compiled for the optimization hints to be available.
- if (!function->shared()->is_compiled()) {
- CompileLazyShared(Handle<SharedFunctionInfo>(function->shared()),
- CLEAR_EXCEPTION,
- 0);
- }
-
bool first_allocation = !function->has_initial_map();
Handle<JSObject> result = Factory::NewJSObject(function);
if (first_allocation) {
Handle<Map> map = Handle<Map>(function->initial_map());
- Handle<Code> stub = Handle<Code>(
- ComputeConstructStub(Handle<SharedFunctionInfo>(function->shared())));
+ Handle<Code> stub = ComputeConstructStub(map);
function->shared()->set_construct_stub(*stub);
}
-
Counters::constructed_objects.Increment();
Counters::constructed_objects_runtime.Increment();
-
return *result;
}
@@ -7410,7 +7386,7 @@
}
-static Object* Runtime_DebugDisassembleFunction(Arguments args) {
+static Object* Runtime_FunctionGetAssemblerCode(Arguments args) {
#ifdef DEBUG
HandleScope scope;
ASSERT(args.length() == 1);
@@ -7425,21 +7401,6 @@
}
-static Object* Runtime_DebugDisassembleConstructor(Arguments args) {
-#ifdef DEBUG
- HandleScope scope;
- ASSERT(args.length() == 1);
- // Get the function and make sure it is compiled.
- CONVERT_ARG_CHECKED(JSFunction, func, 0);
- if (!func->is_compiled() && !CompileLazy(func, KEEP_EXCEPTION)) {
- return Failure::Exception();
- }
- func->shared()->construct_stub()->PrintLn();
-#endif // DEBUG
- return Heap::undefined_value();
-}
-
-
static Object* Runtime_FunctionGetInferredName(Arguments args) {
NoHandleAllocation ha;
ASSERT(args.length() == 1);
« no previous file with comments | « src/runtime.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698