| OLD | NEW |
| 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 <iomanip> | 5 #include <iomanip> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 3210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3221 break; | 3221 break; |
| 3222 } | 3222 } |
| 3223 | 3223 |
| 3224 if (done) break; | 3224 if (done) break; |
| 3225 } | 3225 } |
| 3226 | 3226 |
| 3227 // If the receiver is the JSGlobalObject, the store was contextual. In case | 3227 // If the receiver is the JSGlobalObject, the store was contextual. In case |
| 3228 // the property did not exist yet on the global object itself, we have to | 3228 // the property did not exist yet on the global object itself, we have to |
| 3229 // throw a reference error in strict mode. | 3229 // throw a reference error in strict mode. |
| 3230 if (it->GetReceiver()->IsJSGlobalObject() && is_strict(language_mode)) { | 3230 if (it->GetReceiver()->IsJSGlobalObject() && is_strict(language_mode)) { |
| 3231 Handle<Object> args[] = {it->name()}; | 3231 THROW_NEW_ERROR(it->isolate(), |
| 3232 THROW_NEW_ERROR( | 3232 NewReferenceError(MessageTemplate::kNotDefined, it->name()), |
| 3233 it->isolate(), | 3233 Object); |
| 3234 NewReferenceError("not_defined", HandleVector(args, arraysize(args))), | |
| 3235 Object); | |
| 3236 } | 3234 } |
| 3237 | 3235 |
| 3238 *found = false; | 3236 *found = false; |
| 3239 return MaybeHandle<Object>(); | 3237 return MaybeHandle<Object>(); |
| 3240 } | 3238 } |
| 3241 | 3239 |
| 3242 | 3240 |
| 3243 MaybeHandle<Object> Object::SetProperty(LookupIterator* it, | 3241 MaybeHandle<Object> Object::SetProperty(LookupIterator* it, |
| 3244 Handle<Object> value, | 3242 Handle<Object> value, |
| 3245 LanguageMode language_mode, | 3243 LanguageMode language_mode, |
| (...skipping 13993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17239 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, | 17237 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, |
| 17240 Handle<Object> new_value) { | 17238 Handle<Object> new_value) { |
| 17241 if (cell->value() != *new_value) { | 17239 if (cell->value() != *new_value) { |
| 17242 cell->set_value(*new_value); | 17240 cell->set_value(*new_value); |
| 17243 Isolate* isolate = cell->GetIsolate(); | 17241 Isolate* isolate = cell->GetIsolate(); |
| 17244 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17242 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 17245 isolate, DependentCode::kPropertyCellChangedGroup); | 17243 isolate, DependentCode::kPropertyCellChangedGroup); |
| 17246 } | 17244 } |
| 17247 } | 17245 } |
| 17248 } } // namespace v8::internal | 17246 } } // namespace v8::internal |
| OLD | NEW |