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

Side by Side Diff: src/bootstrapper.cc

Issue 2810333004: [turbofan] Set proper representation for initial arguments length. (Closed)
Patch Set: 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 3011 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 function->shared()->set_instance_class_name(*arguments_string); 3022 function->shared()->set_instance_class_name(*arguments_string);
3023 3023
3024 Handle<Map> map = factory->NewMap( 3024 Handle<Map> map = factory->NewMap(
3025 JS_ARGUMENTS_TYPE, JSSloppyArgumentsObject::kSize, FAST_ELEMENTS); 3025 JS_ARGUMENTS_TYPE, JSSloppyArgumentsObject::kSize, FAST_ELEMENTS);
3026 // Create the descriptor array for the arguments object. 3026 // Create the descriptor array for the arguments object.
3027 Map::EnsureDescriptorSlack(map, 2); 3027 Map::EnsureDescriptorSlack(map, 2);
3028 3028
3029 { // length 3029 { // length
3030 Descriptor d = Descriptor::DataField( 3030 Descriptor d = Descriptor::DataField(
3031 factory->length_string(), JSSloppyArgumentsObject::kLengthIndex, 3031 factory->length_string(), JSSloppyArgumentsObject::kLengthIndex,
3032 DONT_ENUM, Representation::Tagged()); 3032 DONT_ENUM, Representation::Smi());
3033 map->AppendDescriptor(&d); 3033 map->AppendDescriptor(&d);
3034 } 3034 }
3035 { // callee 3035 { // callee
3036 Descriptor d = Descriptor::DataField( 3036 Descriptor d = Descriptor::DataField(
3037 factory->callee_string(), JSSloppyArgumentsObject::kCalleeIndex, 3037 factory->callee_string(), JSSloppyArgumentsObject::kCalleeIndex,
3038 DONT_ENUM, Representation::Tagged()); 3038 DONT_ENUM, Representation::HeapObject());
3039 map->AppendDescriptor(&d); 3039 map->AppendDescriptor(&d);
3040 } 3040 }
3041 // @@iterator method is added later. 3041 // @@iterator method is added later.
3042 3042
3043 map->SetInObjectProperties(2); 3043 map->SetInObjectProperties(2);
3044 native_context()->set_sloppy_arguments_map(*map); 3044 native_context()->set_sloppy_arguments_map(*map);
3045 3045
3046 DCHECK(!function->has_initial_map()); 3046 DCHECK(!function->has_initial_map());
3047 JSFunction::SetInitialMap(function, map, 3047 JSFunction::SetInitialMap(function, map,
3048 isolate->initial_object_prototype()); 3048 isolate->initial_object_prototype());
(...skipping 30 matching lines...) Expand all
3079 3079
3080 // Create the map. Allocate one in-object field for length. 3080 // Create the map. Allocate one in-object field for length.
3081 Handle<Map> map = factory->NewMap( 3081 Handle<Map> map = factory->NewMap(
3082 JS_ARGUMENTS_TYPE, JSStrictArgumentsObject::kSize, FAST_ELEMENTS); 3082 JS_ARGUMENTS_TYPE, JSStrictArgumentsObject::kSize, FAST_ELEMENTS);
3083 // Create the descriptor array for the arguments object. 3083 // Create the descriptor array for the arguments object.
3084 Map::EnsureDescriptorSlack(map, 2); 3084 Map::EnsureDescriptorSlack(map, 2);
3085 3085
3086 { // length 3086 { // length
3087 Descriptor d = Descriptor::DataField( 3087 Descriptor d = Descriptor::DataField(
3088 factory->length_string(), JSStrictArgumentsObject::kLengthIndex, 3088 factory->length_string(), JSStrictArgumentsObject::kLengthIndex,
3089 DONT_ENUM, Representation::Tagged()); 3089 DONT_ENUM, Representation::Smi());
3090 map->AppendDescriptor(&d); 3090 map->AppendDescriptor(&d);
3091 } 3091 }
3092 { // callee 3092 { // callee
3093 Descriptor d = Descriptor::AccessorConstant(factory->callee_string(), 3093 Descriptor d = Descriptor::AccessorConstant(factory->callee_string(),
3094 callee, attributes); 3094 callee, attributes);
3095 map->AppendDescriptor(&d); 3095 map->AppendDescriptor(&d);
3096 } 3096 }
3097 // @@iterator method is added later. 3097 // @@iterator method is added later.
3098 3098
3099 DCHECK_EQ(native_context()->object_function()->prototype(), 3099 DCHECK_EQ(native_context()->object_function()->prototype(),
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
5252 } 5252 }
5253 5253
5254 5254
5255 // Called when the top-level V8 mutex is destroyed. 5255 // Called when the top-level V8 mutex is destroyed.
5256 void Bootstrapper::FreeThreadResources() { 5256 void Bootstrapper::FreeThreadResources() {
5257 DCHECK(!IsActive()); 5257 DCHECK(!IsActive());
5258 } 5258 }
5259 5259
5260 } // namespace internal 5260 } // namespace internal
5261 } // namespace v8 5261 } // 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