OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, | 235 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, |
236 *prototype, | 236 *prototype, |
237 NULL), | 237 NULL), |
238 Object); | 238 Object); |
239 } | 239 } |
240 | 240 |
241 | 241 |
242 Handle<Object> SetProperty(Handle<JSObject> object, | 242 Handle<Object> SetProperty(Handle<JSObject> object, |
243 Handle<String> key, | 243 Handle<String> key, |
244 Handle<Object> value, | 244 Handle<Object> value, |
245 PropertyAttributes attributes) { | 245 PropertyAttributes attributes, |
246 CALL_HEAP_FUNCTION(object->SetProperty(*key, *value, attributes), Object); | 246 StrictModeFlag strict) { |
| 247 CALL_HEAP_FUNCTION(object->SetProperty(*key, *value, attributes, strict), |
| 248 Object); |
247 } | 249 } |
248 | 250 |
249 | 251 |
250 Handle<Object> SetProperty(Handle<Object> object, | 252 Handle<Object> SetProperty(Handle<Object> object, |
251 Handle<Object> key, | 253 Handle<Object> key, |
252 Handle<Object> value, | 254 Handle<Object> value, |
253 PropertyAttributes attributes) { | 255 PropertyAttributes attributes, |
| 256 StrictModeFlag strict) { |
254 CALL_HEAP_FUNCTION( | 257 CALL_HEAP_FUNCTION( |
255 Runtime::SetObjectProperty(object, key, value, attributes), Object); | 258 Runtime::SetObjectProperty(object, key, value, attributes, strict), |
| 259 Object); |
256 } | 260 } |
257 | 261 |
258 | 262 |
259 Handle<Object> ForceSetProperty(Handle<JSObject> object, | 263 Handle<Object> ForceSetProperty(Handle<JSObject> object, |
260 Handle<Object> key, | 264 Handle<Object> key, |
261 Handle<Object> value, | 265 Handle<Object> value, |
262 PropertyAttributes attributes) { | 266 PropertyAttributes attributes) { |
263 CALL_HEAP_FUNCTION( | 267 CALL_HEAP_FUNCTION( |
264 Runtime::ForceSetObjectProperty(object, key, value, attributes), Object); | 268 Runtime::ForceSetObjectProperty(object, key, value, attributes), Object); |
265 } | 269 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 ASSERT(!Top::has_pending_exception()); | 301 ASSERT(!Top::has_pending_exception()); |
298 CHECK(!SetLocalPropertyIgnoreAttributes( | 302 CHECK(!SetLocalPropertyIgnoreAttributes( |
299 object, key, value, attributes).is_null()); | 303 object, key, value, attributes).is_null()); |
300 CHECK(!Top::has_pending_exception()); | 304 CHECK(!Top::has_pending_exception()); |
301 } | 305 } |
302 | 306 |
303 | 307 |
304 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, | 308 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, |
305 Handle<String> key, | 309 Handle<String> key, |
306 Handle<Object> value, | 310 Handle<Object> value, |
307 PropertyAttributes attributes) { | 311 PropertyAttributes attributes, |
| 312 StrictModeFlag strict) { |
308 CALL_HEAP_FUNCTION(object->SetPropertyWithInterceptor(*key, | 313 CALL_HEAP_FUNCTION(object->SetPropertyWithInterceptor(*key, |
309 *value, | 314 *value, |
310 attributes), | 315 attributes, |
| 316 strict), |
311 Object); | 317 Object); |
312 } | 318 } |
313 | 319 |
314 | 320 |
315 Handle<Object> GetProperty(Handle<JSObject> obj, | 321 Handle<Object> GetProperty(Handle<JSObject> obj, |
316 const char* name) { | 322 const char* name) { |
317 Handle<String> str = Factory::LookupAsciiSymbol(name); | 323 Handle<String> str = Factory::LookupAsciiSymbol(name); |
318 CALL_HEAP_FUNCTION(obj->GetProperty(*str), Object); | 324 CALL_HEAP_FUNCTION(obj->GetProperty(*str), Object); |
319 } | 325 } |
320 | 326 |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 | 901 |
896 OptimizedObjectForAddingMultipleProperties:: | 902 OptimizedObjectForAddingMultipleProperties:: |
897 ~OptimizedObjectForAddingMultipleProperties() { | 903 ~OptimizedObjectForAddingMultipleProperties() { |
898 // Reoptimize the object to allow fast property access. | 904 // Reoptimize the object to allow fast property access. |
899 if (has_been_transformed_) { | 905 if (has_been_transformed_) { |
900 TransformToFastProperties(object_, unused_property_fields_); | 906 TransformToFastProperties(object_, unused_property_fields_); |
901 } | 907 } |
902 } | 908 } |
903 | 909 |
904 } } // namespace v8::internal | 910 } } // namespace v8::internal |
OLD | NEW |