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

Side by Side Diff: src/bootstrapper.cc

Issue 2825323002: Revert of [turbofan] Set proper representation for initial arguments length. (Closed)
Patch Set: add test Created 3 years, 8 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 | « no previous file | src/compiler/access-builder.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 "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 function->shared()->set_instance_class_name(*arguments_string); 3069 function->shared()->set_instance_class_name(*arguments_string);
3070 3070
3071 Handle<Map> map = factory->NewMap( 3071 Handle<Map> map = factory->NewMap(
3072 JS_ARGUMENTS_TYPE, JSSloppyArgumentsObject::kSize, FAST_ELEMENTS); 3072 JS_ARGUMENTS_TYPE, JSSloppyArgumentsObject::kSize, FAST_ELEMENTS);
3073 // Create the descriptor array for the arguments object. 3073 // Create the descriptor array for the arguments object.
3074 Map::EnsureDescriptorSlack(map, 2); 3074 Map::EnsureDescriptorSlack(map, 2);
3075 3075
3076 { // length 3076 { // length
3077 Descriptor d = Descriptor::DataField( 3077 Descriptor d = Descriptor::DataField(
3078 factory->length_string(), JSSloppyArgumentsObject::kLengthIndex, 3078 factory->length_string(), JSSloppyArgumentsObject::kLengthIndex,
3079 DONT_ENUM, Representation::Smi()); 3079 DONT_ENUM, Representation::Tagged());
3080 map->AppendDescriptor(&d); 3080 map->AppendDescriptor(&d);
3081 } 3081 }
3082 { // callee 3082 { // callee
3083 Descriptor d = Descriptor::DataField( 3083 Descriptor d = Descriptor::DataField(
3084 factory->callee_string(), JSSloppyArgumentsObject::kCalleeIndex, 3084 factory->callee_string(), JSSloppyArgumentsObject::kCalleeIndex,
3085 DONT_ENUM, Representation::HeapObject()); 3085 DONT_ENUM, Representation::Tagged());
3086 map->AppendDescriptor(&d); 3086 map->AppendDescriptor(&d);
3087 } 3087 }
3088 // @@iterator method is added later. 3088 // @@iterator method is added later.
3089 3089
3090 map->SetInObjectProperties(2); 3090 map->SetInObjectProperties(2);
3091 native_context()->set_sloppy_arguments_map(*map); 3091 native_context()->set_sloppy_arguments_map(*map);
3092 3092
3093 DCHECK(!function->has_initial_map()); 3093 DCHECK(!function->has_initial_map());
3094 JSFunction::SetInitialMap(function, map, 3094 JSFunction::SetInitialMap(function, map,
3095 isolate->initial_object_prototype()); 3095 isolate->initial_object_prototype());
(...skipping 30 matching lines...) Expand all
3126 3126
3127 // Create the map. Allocate one in-object field for length. 3127 // Create the map. Allocate one in-object field for length.
3128 Handle<Map> map = factory->NewMap( 3128 Handle<Map> map = factory->NewMap(
3129 JS_ARGUMENTS_TYPE, JSStrictArgumentsObject::kSize, FAST_ELEMENTS); 3129 JS_ARGUMENTS_TYPE, JSStrictArgumentsObject::kSize, FAST_ELEMENTS);
3130 // Create the descriptor array for the arguments object. 3130 // Create the descriptor array for the arguments object.
3131 Map::EnsureDescriptorSlack(map, 2); 3131 Map::EnsureDescriptorSlack(map, 2);
3132 3132
3133 { // length 3133 { // length
3134 Descriptor d = Descriptor::DataField( 3134 Descriptor d = Descriptor::DataField(
3135 factory->length_string(), JSStrictArgumentsObject::kLengthIndex, 3135 factory->length_string(), JSStrictArgumentsObject::kLengthIndex,
3136 DONT_ENUM, Representation::Smi()); 3136 DONT_ENUM, Representation::Tagged());
3137 map->AppendDescriptor(&d); 3137 map->AppendDescriptor(&d);
3138 } 3138 }
3139 { // callee 3139 { // callee
3140 Descriptor d = Descriptor::AccessorConstant(factory->callee_string(), 3140 Descriptor d = Descriptor::AccessorConstant(factory->callee_string(),
3141 callee, attributes); 3141 callee, attributes);
3142 map->AppendDescriptor(&d); 3142 map->AppendDescriptor(&d);
3143 } 3143 }
3144 // @@iterator method is added later. 3144 // @@iterator method is added later.
3145 3145
3146 DCHECK_EQ(native_context()->object_function()->prototype(), 3146 DCHECK_EQ(native_context()->object_function()->prototype(),
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after
5276 } 5276 }
5277 5277
5278 5278
5279 // Called when the top-level V8 mutex is destroyed. 5279 // Called when the top-level V8 mutex is destroyed.
5280 void Bootstrapper::FreeThreadResources() { 5280 void Bootstrapper::FreeThreadResources() {
5281 DCHECK(!IsActive()); 5281 DCHECK(!IsActive());
5282 } 5282 }
5283 5283
5284 } // namespace internal 5284 } // namespace internal
5285 } // namespace v8 5285 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/access-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698