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

Side by Side Diff: src/objects.cc

Issue 1409613004: Use C++ implementation of Object.definePropert{y,ies} (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix fast path check when bootstrapper is active Created 5 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
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 6493 matching lines...) Expand 10 before | Expand all | Expand 10 after
6504 OrdinaryDefineOwnProperty(isolate, a, isolate->factory()->length_string(), 6504 OrdinaryDefineOwnProperty(isolate, a, isolate->factory()->length_string(),
6505 &readonly, should_throw); 6505 &readonly, should_throw);
6506 } 6506 }
6507 uint32_t actual_new_len = 0; 6507 uint32_t actual_new_len = 0;
6508 CHECK(a->length()->ToArrayLength(&actual_new_len)); 6508 CHECK(a->length()->ToArrayLength(&actual_new_len));
6509 // Steps 19d-v, 21. Return false if there were non-deletable elements. 6509 // Steps 19d-v, 21. Return false if there were non-deletable elements.
6510 success = actual_new_len == new_len; 6510 success = actual_new_len == new_len;
6511 if (!success && should_throw == THROW_ON_ERROR) { 6511 if (!success && should_throw == THROW_ON_ERROR) {
6512 isolate->Throw(*isolate->factory()->NewTypeError( 6512 isolate->Throw(*isolate->factory()->NewTypeError(
6513 MessageTemplate::kStrictDeleteProperty, 6513 MessageTemplate::kStrictDeleteProperty,
6514 isolate->factory()->NewNumberFromUint(actual_new_len - 1))); 6514 isolate->factory()->NewNumberFromUint(actual_new_len - 1), a));
6515 } 6515 }
6516 return success; 6516 return success;
6517 } 6517 }
6518 6518
6519 6519
6520 // static 6520 // static
6521 bool JSReceiver::GetOwnPropertyDescriptor(Isolate* isolate, 6521 bool JSReceiver::GetOwnPropertyDescriptor(Isolate* isolate,
6522 Handle<JSObject> object, 6522 Handle<JSObject> object,
6523 Handle<Object> key, 6523 Handle<Object> key,
6524 PropertyDescriptor* desc) { 6524 PropertyDescriptor* desc) {
(...skipping 11137 matching lines...) Expand 10 before | Expand all | Expand 10 after
17662 if (cell->value() != *new_value) { 17662 if (cell->value() != *new_value) {
17663 cell->set_value(*new_value); 17663 cell->set_value(*new_value);
17664 Isolate* isolate = cell->GetIsolate(); 17664 Isolate* isolate = cell->GetIsolate();
17665 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17665 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17666 isolate, DependentCode::kPropertyCellChangedGroup); 17666 isolate, DependentCode::kPropertyCellChangedGroup);
17667 } 17667 }
17668 } 17668 }
17669 17669
17670 } // namespace internal 17670 } // namespace internal
17671 } // namespace v8 17671 } // namespace v8
OLDNEW
« no previous file with comments | « src/js/v8natives.js ('k') | src/property-descriptor.cc » ('j') | src/property-descriptor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698