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

Side by Side Diff: src/runtime/runtime-classes.cc

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 Created 5 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
« no previous file with comments | « src/objects-printer.cc ('k') | src/runtime/runtime-debug.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 Handle<Object> args[1] = {super_class}; 101 Handle<Object> args[1] = {super_class};
102 THROW_NEW_ERROR_RETURN_FAILURE( 102 THROW_NEW_ERROR_RETURN_FAILURE(
103 isolate, 103 isolate,
104 NewTypeError("extends_value_not_a_function", HandleVector(args, 1))); 104 NewTypeError("extends_value_not_a_function", HandleVector(args, 1)));
105 } 105 }
106 } 106 }
107 107
108 Handle<Map> map = 108 Handle<Map> map =
109 isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 109 isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
110 map->SetPrototype(prototype_parent); 110 map->SetPrototype(prototype_parent);
111 map->set_constructor(*constructor); 111 map->SetConstructor(*constructor);
112 Handle<JSObject> prototype = isolate->factory()->NewJSObjectFromMap(map); 112 Handle<JSObject> prototype = isolate->factory()->NewJSObjectFromMap(map);
113 113
114 Handle<String> name_string = name->IsString() 114 Handle<String> name_string = name->IsString()
115 ? Handle<String>::cast(name) 115 ? Handle<String>::cast(name)
116 : isolate->factory()->empty_string(); 116 : isolate->factory()->empty_string();
117 constructor->shared()->set_name(*name_string); 117 constructor->shared()->set_name(*name_string);
118 118
119 if (!super_class->IsTheHole()) { 119 if (!super_class->IsTheHole()) {
120 Handle<Code> stub(isolate->builtins()->JSConstructStubForDerived()); 120 Handle<Code> stub(isolate->builtins()->JSConstructStubForDerived());
121 constructor->shared()->set_construct_stub(*stub); 121 constructor->shared()->set_construct_stub(*stub);
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 return *isolate->factory()->undefined_value(); 423 return *isolate->factory()->undefined_value();
424 } 424 }
425 425
426 426
427 RUNTIME_FUNCTION(RuntimeReference_DefaultConstructorCallSuper) { 427 RUNTIME_FUNCTION(RuntimeReference_DefaultConstructorCallSuper) {
428 UNREACHABLE(); 428 UNREACHABLE();
429 return nullptr; 429 return nullptr;
430 } 430 }
431 } 431 }
432 } // namespace v8::internal 432 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698