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

Side by Side Diff: src/objects.cc

Issue 659313002: Revert "Correct semantics for numerically indexed stores to typed arrays." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/lookup.cc ('k') | test/mjsunit/harmony/typedarrays.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 2968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2979 // TODO(verwaest): Throw a TypeError with a more specific message. 2979 // TODO(verwaest): Throw a TypeError with a more specific message.
2980 return WriteToReadOnlyProperty(it, value, strict_mode); 2980 return WriteToReadOnlyProperty(it, value, strict_mode);
2981 } 2981 }
2982 2982
2983 Handle<JSObject> receiver = it->GetStoreTarget(); 2983 Handle<JSObject> receiver = it->GetStoreTarget();
2984 2984
2985 // If the receiver is a JSGlobalProxy, store on the prototype (JSGlobalObject) 2985 // If the receiver is a JSGlobalProxy, store on the prototype (JSGlobalObject)
2986 // instead. If the prototype is Null, the proxy is detached. 2986 // instead. If the prototype is Null, the proxy is detached.
2987 if (receiver->IsJSGlobalProxy()) return value; 2987 if (receiver->IsJSGlobalProxy()) return value;
2988 2988
2989 // If the receiver is Indexed Exotic object (currently only typed arrays),
2990 // disallow adding properties with numeric names.
2991 if (it->IsSpecialNumericIndex()) return value;
2992
2993 // Possibly migrate to the most up-to-date map that will be able to store 2989 // Possibly migrate to the most up-to-date map that will be able to store
2994 // |value| under it->name() with |attributes|. 2990 // |value| under it->name() with |attributes|.
2995 it->PrepareTransitionToDataProperty(value, attributes, store_mode); 2991 it->PrepareTransitionToDataProperty(value, attributes, store_mode);
2996 if (it->state() != LookupIterator::TRANSITION) { 2992 if (it->state() != LookupIterator::TRANSITION) {
2997 if (strict_mode == SLOPPY) return value; 2993 if (strict_mode == SLOPPY) return value;
2998 2994
2999 Handle<Object> args[1] = {it->name()}; 2995 Handle<Object> args[1] = {it->name()};
3000 THROW_NEW_ERROR(it->isolate(), 2996 THROW_NEW_ERROR(it->isolate(),
3001 NewTypeError("object_not_extensible", 2997 NewTypeError("object_not_extensible",
3002 HandleVector(args, arraysize(args))), 2998 HandleVector(args, arraysize(args))),
(...skipping 13410 matching lines...) Expand 10 before | Expand all | Expand 10 after
16413 Handle<DependentCode> codes = 16409 Handle<DependentCode> codes =
16414 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16410 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16415 DependentCode::kPropertyCellChangedGroup, 16411 DependentCode::kPropertyCellChangedGroup,
16416 info->object_wrapper()); 16412 info->object_wrapper());
16417 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16413 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16418 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16414 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16419 cell, info->zone()); 16415 cell, info->zone());
16420 } 16416 }
16421 16417
16422 } } // namespace v8::internal 16418 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lookup.cc ('k') | test/mjsunit/harmony/typedarrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698