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

Side by Side Diff: src/runtime.h

Issue 351853005: Split SetProperty(...attributes, strictmode) into AddProperty(...attributes) and SetProperty(...… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/regexp.js ('k') | src/runtime.cc » ('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 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
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) \
210 \ 209 \
211 /* Dates */ \ 210 /* Dates */ \
212 F(DateCurrentTime, 0, 1) \ 211 F(DateCurrentTime, 0, 1) \
213 F(DateParseString, 2, 1) \ 212 F(DateParseString, 2, 1) \
214 F(DateLocalTimezone, 1, 1) \ 213 F(DateLocalTimezone, 1, 1) \
215 F(DateToUTC, 1, 1) \ 214 F(DateToUTC, 1, 1) \
216 F(DateMakeDay, 2, 1) \ 215 F(DateMakeDay, 2, 1) \
217 F(DateSetValue, 3, 1) \ 216 F(DateSetValue, 3, 1) \
218 F(DateCacheVersion, 0, 1) \ 217 F(DateCacheVersion, 0, 1) \
219 \ 218 \
220 /* Globals */ \ 219 /* Globals */ \
221 F(CompileString, 2, 1) \ 220 F(CompileString, 2, 1) \
222 \ 221 \
223 /* Eval */ \ 222 /* Eval */ \
224 F(GlobalReceiver, 1, 1) \ 223 F(GlobalReceiver, 1, 1) \
225 F(IsAttachedGlobal, 1, 1) \ 224 F(IsAttachedGlobal, 1, 1) \
226 \ 225 \
227 F(SetProperty, -1 /* 4 or 5 */, 1) \ 226 F(AddProperty, 4, 1) \
228 F(DefineOrRedefineDataProperty, 4, 1) \ 227 F(SetProperty, 4, 1) \
229 F(DefineOrRedefineAccessorProperty, 5, 1) \ 228 F(DefineDataPropertyUnchecked, 4, 1) \
230 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \ 229 F(DefineAccessorPropertyUnchecked, 5, 1) \
231 F(GetDataProperty, 2, 1) \ 230 F(GetDataProperty, 2, 1) \
232 F(SetHiddenProperty, 3, 1) \ 231 F(SetHiddenProperty, 3, 1) \
233 \ 232 \
234 /* Arrays */ \ 233 /* Arrays */ \
235 F(RemoveArrayHoles, 2, 1) \ 234 F(RemoveArrayHoles, 2, 1) \
236 F(GetArrayKeys, 2, 1) \ 235 F(GetArrayKeys, 2, 1) \
237 F(MoveArrayContents, 2, 1) \ 236 F(MoveArrayContents, 2, 1) \
238 F(EstimateNumberOfElements, 1, 1) \ 237 F(EstimateNumberOfElements, 1, 1) \
239 \ 238 \
240 /* Getters and Setters */ \ 239 /* Getters and Setters */ \
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 // TODO(1240886): Some of the following methods are *not* handle safe, but 797 // TODO(1240886): Some of the following methods are *not* handle safe, but
799 // accept handle arguments. This seems fragile. 798 // accept handle arguments. This seems fragile.
800 799
801 // Support getting the characters in a string using [] notation as 800 // Support getting the characters in a string using [] notation as
802 // in Firefox/SpiderMonkey, Safari and Opera. 801 // in Firefox/SpiderMonkey, Safari and Opera.
803 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt( 802 MUST_USE_RESULT static MaybeHandle<Object> GetElementOrCharAt(
804 Isolate* isolate, 803 Isolate* isolate,
805 Handle<Object> object, 804 Handle<Object> object,
806 uint32_t index); 805 uint32_t index);
807 806
807 // Do not use SetObjectProperty to configure a property with specific
808 // attributes. The argument will be removed once the API is adapted.
808 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty( 809 MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty(
809 Isolate* isolate, 810 Isolate* isolate,
810 Handle<Object> object, 811 Handle<Object> object,
811 Handle<Object> key, 812 Handle<Object> key,
812 Handle<Object> value, 813 Handle<Object> value,
813 PropertyAttributes attr, 814 StrictMode strict_mode,
814 StrictMode strict_mode); 815 PropertyAttributes attributes = NONE);
815 816
816 MUST_USE_RESULT static MaybeHandle<Object> ForceSetObjectProperty( 817 MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty(
817 Handle<JSObject> object, 818 Handle<JSObject> object,
818 Handle<Object> key, 819 Handle<Object> key,
819 Handle<Object> value, 820 Handle<Object> value,
820 PropertyAttributes attr, 821 PropertyAttributes attr,
821 JSReceiver::StoreFromKeyed store_from_keyed 822 JSReceiver::StoreFromKeyed store_from_keyed =
822 = JSReceiver::MAY_BE_STORE_FROM_KEYED); 823 JSReceiver::MAY_BE_STORE_FROM_KEYED);
823 824
824 MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty( 825 MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty(
825 Isolate* isolate, 826 Isolate* isolate,
826 Handle<JSReceiver> object, 827 Handle<JSReceiver> object,
827 Handle<Object> key, 828 Handle<Object> key,
828 JSReceiver::DeleteMode mode); 829 JSReceiver::DeleteMode mode);
829 830
830 MUST_USE_RESULT static MaybeHandle<Object> HasObjectProperty( 831 MUST_USE_RESULT static MaybeHandle<Object> HasObjectProperty(
831 Isolate* isolate, 832 Isolate* isolate,
832 Handle<JSReceiver> object, 833 Handle<JSReceiver> object,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {}; 892 class AllocateDoubleAlignFlag: public BitField<bool, 0, 1> {};
892 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {}; 893 class AllocateTargetSpace: public BitField<AllocationSpace, 1, 3> {};
893 894
894 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {}; 895 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
895 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {}; 896 class DeclareGlobalsNativeFlag: public BitField<bool, 1, 1> {};
896 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {}; 897 class DeclareGlobalsStrictMode: public BitField<StrictMode, 2, 1> {};
897 898
898 } } // namespace v8::internal 899 } } // namespace v8::internal
899 900
900 #endif // V8_RUNTIME_H_ 901 #endif // V8_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/regexp.js ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698