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

Side by Side Diff: src/objects.cc

Issue 1424283002: [es6] Fix WeakMap/Set built-ins subclasssing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@func-subclass
Patch Set: Test updated once again Created 5 years, 1 month 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 | test/mjsunit/es6/classes-subclass-builtins.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 "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 17313 matching lines...) Expand 10 before | Expand all | Expand 10 after
17324 17324
17325 void JSMap::Clear(Handle<JSMap> map) { 17325 void JSMap::Clear(Handle<JSMap> map) {
17326 Handle<OrderedHashMap> table(OrderedHashMap::cast(map->table())); 17326 Handle<OrderedHashMap> table(OrderedHashMap::cast(map->table()));
17327 table = OrderedHashMap::Clear(table); 17327 table = OrderedHashMap::Clear(table);
17328 map->set_table(*table); 17328 map->set_table(*table);
17329 } 17329 }
17330 17330
17331 17331
17332 void JSWeakCollection::Initialize(Handle<JSWeakCollection> weak_collection, 17332 void JSWeakCollection::Initialize(Handle<JSWeakCollection> weak_collection,
17333 Isolate* isolate) { 17333 Isolate* isolate) {
17334 DCHECK_EQ(0, weak_collection->map()->GetInObjectProperties());
17335 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0); 17334 Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 0);
17336 weak_collection->set_table(*table); 17335 weak_collection->set_table(*table);
17337 } 17336 }
17338 17337
17339 17338
17340 void JSWeakCollection::Set(Handle<JSWeakCollection> weak_collection, 17339 void JSWeakCollection::Set(Handle<JSWeakCollection> weak_collection,
17341 Handle<Object> key, Handle<Object> value, 17340 Handle<Object> key, Handle<Object> value,
17342 int32_t hash) { 17341 int32_t hash) {
17343 DCHECK(key->IsJSReceiver() || key->IsSymbol()); 17342 DCHECK(key->IsJSReceiver() || key->IsSymbol());
17344 Handle<ObjectHashTable> table( 17343 Handle<ObjectHashTable> table(
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
18027 if (cell->value() != *new_value) { 18026 if (cell->value() != *new_value) {
18028 cell->set_value(*new_value); 18027 cell->set_value(*new_value);
18029 Isolate* isolate = cell->GetIsolate(); 18028 Isolate* isolate = cell->GetIsolate();
18030 cell->dependent_code()->DeoptimizeDependentCodeGroup( 18029 cell->dependent_code()->DeoptimizeDependentCodeGroup(
18031 isolate, DependentCode::kPropertyCellChangedGroup); 18030 isolate, DependentCode::kPropertyCellChangedGroup);
18032 } 18031 }
18033 } 18032 }
18034 18033
18035 } // namespace internal 18034 } // namespace internal
18036 } // namespace v8 18035 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/classes-subclass-builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698