 Chromium Code Reviews
 Chromium Code Reviews Issue 351853005:
  Split SetProperty(...attributes, strictmode) into AddProperty(...attributes) and SetProperty(...…  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 351853005:
  Split SetProperty(...attributes, strictmode) into AddProperty(...attributes) and SetProperty(...…  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| OLD | NEW | 
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_H_ | 
| 6 #define V8_RUNTIME_H_ | 6 #define V8_RUNTIME_H_ | 
| 7 | 7 | 
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" | 
| 9 #include "src/zone.h" | 9 #include "src/zone.h" | 
| 10 | 10 | 
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 F(GetAndClearOverflowedStackTrace, 1, 1) \ | 199 F(GetAndClearOverflowedStackTrace, 1, 1) \ | 
| 200 F(GetV8Version, 0, 1) \ | 200 F(GetV8Version, 0, 1) \ | 
| 201 \ | 201 \ | 
| 202 F(SetCode, 2, 1) \ | 202 F(SetCode, 2, 1) \ | 
| 203 \ | 203 \ | 
| 204 F(CreateApiFunction, 2, 1) \ | 204 F(CreateApiFunction, 2, 1) \ | 
| 205 F(IsTemplate, 1, 1) \ | 205 F(IsTemplate, 1, 1) \ | 
| 206 F(GetTemplateField, 2, 1) \ | 206 F(GetTemplateField, 2, 1) \ | 
| 207 F(DisableAccessChecks, 1, 1) \ | 207 F(DisableAccessChecks, 1, 1) \ | 
| 208 F(EnableAccessChecks, 1, 1) \ | 208 F(EnableAccessChecks, 1, 1) \ | 
| 209 F(SetAccessorProperty, 5, 1) \ | 209 F(DefineAccessorProperty, 5, 1) \ | 
| 
rossberg
2014/06/27 09:47:30
Nit: move this down to the other Define functions
 
Toon Verwaest
2014/06/27 13:16:22
Done.
 | |
| 210 \ | 210 \ | 
| 211 /* Dates */ \ | 211 /* Dates */ \ | 
| 212 F(DateCurrentTime, 0, 1) \ | 212 F(DateCurrentTime, 0, 1) \ | 
| 213 F(DateParseString, 2, 1) \ | 213 F(DateParseString, 2, 1) \ | 
| 214 F(DateLocalTimezone, 1, 1) \ | 214 F(DateLocalTimezone, 1, 1) \ | 
| 215 F(DateToUTC, 1, 1) \ | 215 F(DateToUTC, 1, 1) \ | 
| 216 F(DateMakeDay, 2, 1) \ | 216 F(DateMakeDay, 2, 1) \ | 
| 217 F(DateSetValue, 3, 1) \ | 217 F(DateSetValue, 3, 1) \ | 
| 218 F(DateCacheVersion, 0, 1) \ | 218 F(DateCacheVersion, 0, 1) \ | 
| 219 \ | 219 \ | 
| 220 /* Globals */ \ | 220 /* Globals */ \ | 
| 221 F(CompileString, 2, 1) \ | 221 F(CompileString, 2, 1) \ | 
| 222 \ | 222 \ | 
| 223 /* Eval */ \ | 223 /* Eval */ \ | 
| 224 F(GlobalReceiver, 1, 1) \ | 224 F(GlobalReceiver, 1, 1) \ | 
| 225 F(IsAttachedGlobal, 1, 1) \ | 225 F(IsAttachedGlobal, 1, 1) \ | 
| 226 \ | 226 \ | 
| 227 F(SetProperty, -1 /* 4 or 5 */, 1) \ | 227 F(DefineProperty, 4, 1) \ | 
| 
rossberg
2014/06/27 09:47:30
How about naming this DefineDataProperty, for symm
 | |
| 228 F(SetProperty, 4, 1) \ | |
| 228 F(DefineOrRedefineDataProperty, 4, 1) \ | 229 F(DefineOrRedefineDataProperty, 4, 1) \ | 
| 229 F(DefineOrRedefineAccessorProperty, 5, 1) \ | 230 F(DefineOrRedefineAccessorProperty, 5, 1) \ | 
| 230 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \ | 231 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \ | 
| 231 F(GetDataProperty, 2, 1) \ | 232 F(GetDataProperty, 2, 1) \ | 
| 232 F(SetHiddenProperty, 3, 1) \ | 233 F(SetHiddenProperty, 3, 1) \ | 
| 233 \ | 234 \ | 
| 234 /* Arrays */ \ | 235 /* Arrays */ \ | 
| 235 F(RemoveArrayHoles, 2, 1) \ | 236 F(RemoveArrayHoles, 2, 1) \ | 
| 236 F(GetArrayKeys, 2, 1) \ | 237 F(GetArrayKeys, 2, 1) \ | 
| 237 F(MoveArrayContents, 2, 1) \ | 238 F(MoveArrayContents, 2, 1) \ | 
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 798 // TODO(1240886): Some of the following methods are *not* handle safe, but | 799 // TODO(1240886): Some of the following methods are *not* handle safe, but | 
| 799 // accept handle arguments. This seems fragile. | 800 // accept handle arguments. This seems fragile. | 
| 800 | 801 | 
| 801 // Support getting the characters in a string using [] notation as | 802 // Support getting the characters in a string using [] notation as | 
| 802 // in Firefox/SpiderMonkey, Safari and Opera. | 803 // in Firefox/SpiderMonkey, Safari and Opera. | 
| 803 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( | 804 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( | 
| 804 Isolate* isolate, | 805 Isolate* isolate, | 
| 805 Handle<Object> object, | 806 Handle<Object> object, | 
| 806 uint32_t index); | 807 uint32_t index); | 
| 807 | 808 | 
| 809 // Do not use SetObjectProperty to configure a property with specific | |
| 810 // attributes. The argument will be removed once the API is adapted. | |
| 808 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( | 811 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( | 
| 809 Isolate* isolate, | 812 Isolate* isolate, | 
| 810 Handle<Object> object, | 813 Handle<Object> object, | 
| 811 Handle<Object> key, | 814 Handle<Object> key, | 
| 812 Handle<Object> value, | 815 Handle<Object> value, | 
| 813 PropertyAttributes attr, | 816 StrictMode strict_mode, | 
| 814 StrictMode strict_mode); | 817 PropertyAttributes attributes = NONE); | 
| 815 | 818 | 
| 816 MUST_USE_RESULT static MaybeHandle<Object> ForceSetObjectProperty( | 819 MUST_USE_RESULT static MaybeHandle<Object> ForceSetObjectProperty( | 
| 
rossberg
2014/06/27 09:47:30
It might make sense to also rename this to DefineO
 
Toon Verwaest
2014/06/27 13:16:22
Done.
 | |
| 817 Handle<JSObject> object, | 820 Handle<JSObject> object, | 
| 818 Handle<Object> key, | 821 Handle<Object> key, | 
| 819 Handle<Object> value, | 822 Handle<Object> value, | 
| 820 PropertyAttributes attr, | 823 PropertyAttributes attr, | 
| 821 JSReceiver::StoreFromKeyed store_from_keyed | 824 JSReceiver::StoreFromKeyed store_from_keyed = | 
| 822 = JSReceiver::MAY_BE_STORE_FROM_KEYED); | 825 JSReceiver::MAY_BE_STORE_FROM_KEYED); | 
| 823 | 826 | 
| 824 MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty( | 827 MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty( | 
| 825 Isolate* isolate, | 828 Isolate* isolate, | 
| 826 Handle<JSReceiver> object, | 829 Handle<JSReceiver> object, | 
| 827 Handle<Object> key, | 830 Handle<Object> key, | 
| 828 JSReceiver::DeleteMode mode); | 831 JSReceiver::DeleteMode mode); | 
| 829 | 832 | 
| 830 MUST_USE_RESULT static MaybeHandle<Object> HasObjectProperty( | 833 MUST_USE_RESULT static MaybeHandle<Object> HasObjectProperty( | 
| 831 Isolate* isolate, | 834 Isolate* isolate, | 
| 832 Handle<JSReceiver> object, | 835 Handle<JSReceiver> object, | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 891 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 894 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; | 
| 892 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 895 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; | 
| 893 | 896 | 
| 894 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 897 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; | 
| 895 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 898 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; | 
| 896 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 899 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; | 
| 897 | 900 | 
| 898 } } // namespace v8::internal | 901 } } // namespace v8::internal | 
| 899 | 902 | 
| 900 #endif // V8_RUNTIME_H_ | 903 #endif // V8_RUNTIME_H_ | 
| OLD | NEW |