blob: 001e05fc3bc93220e63f4d88a713b0aece02e7ef [file] [log] [blame]
Steve Blocka7e24c12009-10-30 11:49:00 +00001// Copyright 2006-2008 the V8 project authors. All rights reserved.
2// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above
9// copyright notice, this list of conditions and the following
10// disclaimer in the documentation and/or other materials provided
11// with the distribution.
12// * Neither the name of Google Inc. nor the names of its
13// contributors may be used to endorse or promote products derived
14// from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef V8_RUNTIME_H_
29#define V8_RUNTIME_H_
30
31namespace v8 {
32namespace internal {
33
34// The interface to C++ runtime functions.
35
36// ----------------------------------------------------------------------------
37// RUNTIME_FUNCTION_LIST_ALWAYS defines runtime calls available in both
38// release and debug mode.
39// This macro should only be used by the macro RUNTIME_FUNCTION_LIST.
40
41// WARNING: RUNTIME_FUNCTION_LIST_ALWAYS_* is a very large macro that caused
42// MSVC Intellisense to crash. It was broken into two macros to work around
43// this problem. Please avoid large recursive macros whenever possible.
44#define RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
45 /* Property access */ \
46 F(GetProperty, 2, 1) \
47 F(KeyedGetProperty, 2, 1) \
48 F(DeleteProperty, 2, 1) \
49 F(HasLocalProperty, 2, 1) \
50 F(HasProperty, 2, 1) \
51 F(HasElement, 2, 1) \
52 F(IsPropertyEnumerable, 2, 1) \
53 F(GetPropertyNames, 1, 1) \
54 F(GetPropertyNamesFast, 1, 1) \
Leon Clarkee46be812010-01-19 14:06:41 +000055 F(GetLocalPropertyNames, 1, 1) \
56 F(GetLocalElementNames, 1, 1) \
57 F(GetInterceptorInfo, 1, 1) \
58 F(GetNamedInterceptorPropertyNames, 1, 1) \
59 F(GetIndexedInterceptorElementNames, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +000060 F(GetArgumentsProperty, 1, 1) \
61 F(ToFastProperties, 1, 1) \
62 F(ToSlowProperties, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +010063 F(FinishArrayPrototypeSetup, 1, 1) \
64 F(SpecialArrayFunctions, 1, 1) \
65 F(GetGlobalReceiver, 0, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +000066 \
67 F(IsInPrototypeChain, 2, 1) \
68 F(SetHiddenPrototype, 2, 1) \
69 \
70 F(IsConstructCall, 0, 1) \
71 \
Leon Clarkee46be812010-01-19 14:06:41 +000072 F(GetOwnProperty, 2, 1) \
73 \
74 F(IsExtensible, 1, 1) \
Steve Block8defd9f2010-07-08 12:39:36 +010075 F(PreventExtensions, 1, 1)\
Leon Clarkee46be812010-01-19 14:06:41 +000076 \
Steve Blocka7e24c12009-10-30 11:49:00 +000077 /* Utilities */ \
Steve Blocka7e24c12009-10-30 11:49:00 +000078 F(GetFunctionDelegate, 1, 1) \
79 F(GetConstructorDelegate, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +000080 F(NewArgumentsFast, 3, 1) \
81 F(LazyCompile, 1, 1) \
82 F(SetNewFunctionAttributes, 1, 1) \
Ben Murdochbb769b22010-08-11 14:56:33 +010083 F(AllocateInNewSpace, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +000084 \
85 /* Array join support */ \
86 F(PushIfAbsent, 2, 1) \
87 F(ArrayConcat, 1, 1) \
88 \
89 /* Conversions */ \
90 F(ToBool, 1, 1) \
91 F(Typeof, 1, 1) \
92 \
93 F(StringToNumber, 1, 1) \
94 F(StringFromCharCodeArray, 1, 1) \
95 F(StringParseInt, 2, 1) \
96 F(StringParseFloat, 1, 1) \
97 F(StringToLowerCase, 1, 1) \
98 F(StringToUpperCase, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +010099 F(StringSplit, 3, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000100 F(CharFromCode, 1, 1) \
101 F(URIEscape, 1, 1) \
102 F(URIUnescape, 1, 1) \
103 \
104 F(NumberToString, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100105 F(NumberToStringSkipCache, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000106 F(NumberToInteger, 1, 1) \
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100107 F(NumberToIntegerMapMinusZero, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000108 F(NumberToJSUint32, 1, 1) \
109 F(NumberToJSInt32, 1, 1) \
110 F(NumberToSmi, 1, 1) \
111 \
112 /* Arithmetic operations */ \
113 F(NumberAdd, 2, 1) \
114 F(NumberSub, 2, 1) \
115 F(NumberMul, 2, 1) \
116 F(NumberDiv, 2, 1) \
117 F(NumberMod, 2, 1) \
118 F(NumberUnaryMinus, 1, 1) \
Ben Murdoch3bec4d22010-07-22 14:51:16 +0100119 F(NumberAlloc, 0, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000120 \
121 F(StringAdd, 2, 1) \
Leon Clarkee46be812010-01-19 14:06:41 +0000122 F(StringBuilderConcat, 3, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000123 \
124 /* Bit operations */ \
125 F(NumberOr, 2, 1) \
126 F(NumberAnd, 2, 1) \
127 F(NumberXor, 2, 1) \
128 F(NumberNot, 1, 1) \
129 \
130 F(NumberShl, 2, 1) \
131 F(NumberShr, 2, 1) \
132 F(NumberSar, 2, 1) \
133 \
134 /* Comparisons */ \
135 F(NumberEquals, 2, 1) \
136 F(StringEquals, 2, 1) \
137 \
138 F(NumberCompare, 3, 1) \
139 F(SmiLexicographicCompare, 2, 1) \
140 F(StringCompare, 2, 1) \
141 \
142 /* Math */ \
Steve Blocka7e24c12009-10-30 11:49:00 +0000143 F(Math_acos, 1, 1) \
144 F(Math_asin, 1, 1) \
145 F(Math_atan, 1, 1) \
146 F(Math_atan2, 2, 1) \
147 F(Math_ceil, 1, 1) \
148 F(Math_cos, 1, 1) \
149 F(Math_exp, 1, 1) \
150 F(Math_floor, 1, 1) \
151 F(Math_log, 1, 1) \
152 F(Math_pow, 2, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100153 F(Math_pow_cfunction, 2, 1) \
154 F(RoundNumber, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000155 F(Math_sin, 1, 1) \
156 F(Math_sqrt, 1, 1) \
157 F(Math_tan, 1, 1) \
158 \
159 /* Regular expressions */ \
160 F(RegExpCompile, 3, 1) \
161 F(RegExpExec, 4, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100162 F(RegExpExecMultiple, 4, 1) \
163 F(RegExpInitializeObject, 5, 1) \
164 F(RegExpConstructResult, 3, 1) \
Steve Block791712a2010-08-27 10:21:07 +0100165 F(RegExpCloneResult, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000166 \
167 /* Strings */ \
168 F(StringCharCodeAt, 2, 1) \
169 F(StringIndexOf, 3, 1) \
170 F(StringLastIndexOf, 3, 1) \
171 F(StringLocaleCompare, 2, 1) \
Steve Blockd0582a62009-12-15 09:54:21 +0000172 F(SubString, 3, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000173 F(StringReplaceRegExpWithString, 4, 1) \
174 F(StringMatch, 3, 1) \
Steve Block3ce2e202009-11-05 08:53:23 +0000175 F(StringTrim, 3, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100176 F(StringToArray, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000177 \
178 /* Numbers */ \
179 F(NumberToRadixString, 2, 1) \
180 F(NumberToFixed, 2, 1) \
181 F(NumberToExponential, 2, 1) \
182 F(NumberToPrecision, 2, 1)
183
184#define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
185 /* Reflection */ \
186 F(FunctionSetInstanceClassName, 2, 1) \
187 F(FunctionSetLength, 2, 1) \
188 F(FunctionSetPrototype, 2, 1) \
189 F(FunctionGetName, 1, 1) \
190 F(FunctionSetName, 2, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100191 F(FunctionRemovePrototype, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000192 F(FunctionGetSourceCode, 1, 1) \
193 F(FunctionGetScript, 1, 1) \
194 F(FunctionGetScriptSourcePosition, 1, 1) \
195 F(FunctionGetPositionForOffset, 2, 1) \
196 F(FunctionIsAPIFunction, 1, 1) \
197 F(FunctionIsBuiltin, 1, 1) \
198 F(GetScript, 1, 1) \
199 F(CollectStackTrace, 2, 1) \
Steve Block3ce2e202009-11-05 08:53:23 +0000200 F(GetV8Version, 0, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000201 \
202 F(ClassOf, 1, 1) \
203 F(SetCode, 2, 1) \
204 \
205 F(CreateApiFunction, 1, 1) \
206 F(IsTemplate, 1, 1) \
207 F(GetTemplateField, 2, 1) \
208 F(DisableAccessChecks, 1, 1) \
209 F(EnableAccessChecks, 1, 1) \
210 \
211 /* Dates */ \
212 F(DateCurrentTime, 0, 1) \
213 F(DateParseString, 2, 1) \
214 F(DateLocalTimezone, 1, 1) \
215 F(DateLocalTimeOffset, 0, 1) \
216 F(DateDaylightSavingsOffset, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100217 F(DateMakeDay, 3, 1) \
218 F(DateYMDFromTime, 2, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000219 \
220 /* Numbers */ \
Steve Blocka7e24c12009-10-30 11:49:00 +0000221 \
222 /* Globals */ \
223 F(CompileString, 2, 1) \
224 F(GlobalPrint, 1, 1) \
225 \
226 /* Eval */ \
227 F(GlobalReceiver, 1, 1) \
Leon Clarkee46be812010-01-19 14:06:41 +0000228 F(ResolvePossiblyDirectEval, 3, 2) \
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100229 F(ResolvePossiblyDirectEvalNoLookup, 3, 2) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000230 \
231 F(SetProperty, -1 /* 3 or 4 */, 1) \
Andrei Popescu31002712010-02-23 13:46:05 +0000232 F(DefineOrRedefineDataProperty, 4, 1) \
233 F(DefineOrRedefineAccessorProperty, 5, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000234 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \
235 \
236 /* Arrays */ \
237 F(RemoveArrayHoles, 2, 1) \
238 F(GetArrayKeys, 2, 1) \
239 F(MoveArrayContents, 2, 1) \
240 F(EstimateNumberOfElements, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100241 F(SwapElements, 3, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000242 \
243 /* Getters and Setters */ \
244 F(DefineAccessor, -1 /* 4 or 5 */, 1) \
245 F(LookupAccessor, 3, 1) \
246 \
247 /* Literals */ \
248 F(MaterializeRegExpLiteral, 4, 1)\
249 F(CreateArrayLiteralBoilerplate, 3, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000250 F(CloneLiteralBoilerplate, 1, 1) \
251 F(CloneShallowLiteralBoilerplate, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100252 F(CreateObjectLiteral, 4, 1) \
253 F(CreateObjectLiteralShallow, 4, 1) \
Leon Clarkee46be812010-01-19 14:06:41 +0000254 F(CreateArrayLiteral, 3, 1) \
255 F(CreateArrayLiteralShallow, 3, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000256 \
257 /* Catch context extension objects */ \
258 F(CreateCatchExtensionObject, 2, 1) \
259 \
260 /* Statements */ \
261 F(NewClosure, 2, 1) \
262 F(NewObject, 1, 1) \
Kristian Monsen50ef84f2010-07-29 15:18:00 +0100263 F(NewObjectFromBound, 2, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000264 F(Throw, 1, 1) \
265 F(ReThrow, 1, 1) \
266 F(ThrowReferenceError, 1, 1) \
267 F(StackGuard, 1, 1) \
Steve Blockd0582a62009-12-15 09:54:21 +0000268 F(PromoteScheduledException, 0, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000269 \
270 /* Contexts */ \
271 F(NewContext, 1, 1) \
272 F(PushContext, 1, 1) \
273 F(PushCatchContext, 1, 1) \
274 F(LookupContext, 2, 1) \
275 F(LoadContextSlot, 2, 2) \
276 F(LoadContextSlotNoReferenceError, 2, 2) \
277 F(StoreContextSlot, 3, 1) \
278 \
279 /* Declarations and initialization */ \
280 F(DeclareGlobals, 3, 1) \
281 F(DeclareContextSlot, 4, 1) \
282 F(InitializeVarGlobal, -1 /* 1 or 2 */, 1) \
283 F(InitializeConstGlobal, 2, 1) \
284 F(InitializeConstContextSlot, 3, 1) \
285 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000286 \
287 /* Debugging */ \
288 F(DebugPrint, 1, 1) \
289 F(DebugTrace, 0, 1) \
290 F(TraceEnter, 0, 1) \
291 F(TraceExit, 1, 1) \
292 F(Abort, 2, 1) \
293 /* Logging */ \
294 F(Log, 2, 1) \
295 /* ES5 */ \
296 F(LocalKeys, 1, 1) \
Steve Blockd0582a62009-12-15 09:54:21 +0000297 /* Handle scopes */ \
298 F(DeleteHandleScopeExtensions, 0, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100299 /* Cache suport */ \
300 F(GetFromCache, 2, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000301 \
302 /* Pseudo functions - handled as macros by parser */ \
Andrei Popescu402d9372010-02-26 13:31:12 +0000303 F(IS_VAR, 1, 1)
Steve Blocka7e24c12009-10-30 11:49:00 +0000304
305#ifdef ENABLE_DEBUGGER_SUPPORT
306#define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
307 /* Debugger support*/ \
308 F(DebugBreak, 0, 1) \
309 F(SetDebugEventListener, 2, 1) \
310 F(Break, 0, 1) \
311 F(DebugGetPropertyDetails, 2, 1) \
312 F(DebugGetProperty, 2, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000313 F(DebugPropertyTypeFromDetails, 1, 1) \
314 F(DebugPropertyAttributesFromDetails, 1, 1) \
315 F(DebugPropertyIndexFromDetails, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000316 F(DebugNamedInterceptorPropertyValue, 2, 1) \
317 F(DebugIndexedInterceptorElementValue, 2, 1) \
318 F(CheckExecutionState, 1, 1) \
319 F(GetFrameCount, 1, 1) \
320 F(GetFrameDetails, 2, 1) \
321 F(GetScopeCount, 2, 1) \
322 F(GetScopeDetails, 3, 1) \
323 F(DebugPrintScopes, 0, 1) \
324 F(GetCFrames, 1, 1) \
325 F(GetThreadCount, 1, 1) \
326 F(GetThreadDetails, 2, 1) \
Ben Murdochbb769b22010-08-11 14:56:33 +0100327 F(SetDisableBreak, 1, 1) \
Steve Blocka7e24c12009-10-30 11:49:00 +0000328 F(GetBreakLocations, 1, 1) \
329 F(SetFunctionBreakPoint, 3, 1) \
330 F(SetScriptBreakPoint, 3, 1) \
331 F(ClearBreakPoint, 1, 1) \
332 F(ChangeBreakOnException, 2, 1) \
333 F(PrepareStep, 3, 1) \
334 F(ClearStepping, 0, 1) \
335 F(DebugEvaluate, 4, 1) \
336 F(DebugEvaluateGlobal, 3, 1) \
337 F(DebugGetLoadedScripts, 0, 1) \
338 F(DebugReferencedBy, 3, 1) \
339 F(DebugConstructedBy, 2, 1) \
340 F(DebugGetPrototype, 1, 1) \
341 F(SystemBreak, 0, 1) \
342 F(DebugDisassembleFunction, 1, 1) \
343 F(DebugDisassembleConstructor, 1, 1) \
Steve Block6ded16b2010-05-10 14:33:55 +0100344 F(FunctionGetInferredName, 1, 1) \
345 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \
346 F(LiveEditGatherCompileInfo, 2, 1) \
347 F(LiveEditReplaceScript, 3, 1) \
348 F(LiveEditReplaceFunctionCode, 2, 1) \
349 F(LiveEditFunctionSetScript, 2, 1) \
350 F(LiveEditReplaceRefToNestedFunction, 3, 1) \
351 F(LiveEditPatchFunctionPositions, 2, 1) \
352 F(LiveEditCheckAndDropActivations, 2, 1) \
353 F(LiveEditCompareStringsLinewise, 2, 1) \
354 F(GetFunctionCodePositionFromSource, 2, 1) \
355 F(ExecuteInDebugContext, 2, 1)
Steve Blocka7e24c12009-10-30 11:49:00 +0000356#else
357#define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
358#endif
359
Steve Blockd0582a62009-12-15 09:54:21 +0000360#ifdef ENABLE_LOGGING_AND_PROFILING
361#define RUNTIME_FUNCTION_LIST_PROFILER_SUPPORT(F) \
Andrei Popescu402d9372010-02-26 13:31:12 +0000362 F(ProfilerResume, 2, 1) \
363 F(ProfilerPause, 2, 1)
Steve Blockd0582a62009-12-15 09:54:21 +0000364#else
365#define RUNTIME_FUNCTION_LIST_PROFILER_SUPPORT(F)
366#endif
367
Steve Blocka7e24c12009-10-30 11:49:00 +0000368#ifdef DEBUG
369#define RUNTIME_FUNCTION_LIST_DEBUG(F) \
370 /* Testing */ \
371 F(ListNatives, 0, 1)
372#else
373#define RUNTIME_FUNCTION_LIST_DEBUG(F)
374#endif
375
376
377// ----------------------------------------------------------------------------
378// RUNTIME_FUNCTION_LIST defines all runtime functions accessed
379// either directly by id (via the code generator), or indirectly
380// via a native call by name (from within JS code).
381
382#define RUNTIME_FUNCTION_LIST(F) \
383 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
384 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
385 RUNTIME_FUNCTION_LIST_DEBUG(F) \
Steve Blockd0582a62009-12-15 09:54:21 +0000386 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
387 RUNTIME_FUNCTION_LIST_PROFILER_SUPPORT(F)
Steve Blocka7e24c12009-10-30 11:49:00 +0000388
389// ----------------------------------------------------------------------------
390// Runtime provides access to all C++ runtime functions.
391
392class Runtime : public AllStatic {
393 public:
394 enum FunctionId {
395#define F(name, nargs, ressize) k##name,
396 RUNTIME_FUNCTION_LIST(F)
397 kNofFunctions
398#undef F
399 };
400
401 // Runtime function descriptor.
402 struct Function {
403 // The JS name of the function.
404 const char* name;
405
Steve Blocka7e24c12009-10-30 11:49:00 +0000406 // The C++ (native) entry point.
407 byte* entry;
408
409 // The number of arguments expected; nargs < 0 if variable no. of
410 // arguments.
411 int nargs;
412 int stub_id;
413 // Size of result, if complex (larger than a single pointer),
414 // otherwise zero.
415 int result_size;
416 };
417
418 // Get the runtime function with the given function id.
419 static Function* FunctionForId(FunctionId fid);
420
421 // Get the runtime function with the given name.
422 static Function* FunctionForName(const char* name);
423
424 static int StringMatch(Handle<String> sub, Handle<String> pat, int index);
425
426 static bool IsUpperCaseChar(uint16_t ch);
427
428 // TODO(1240886): The following three methods are *not* handle safe,
429 // but accept handle arguments. This seems fragile.
430
431 // Support getting the characters in a string using [] notation as
432 // in Firefox/SpiderMonkey, Safari and Opera.
433 static Object* GetElementOrCharAt(Handle<Object> object, uint32_t index);
Steve Block6ded16b2010-05-10 14:33:55 +0100434 static Object* GetElement(Handle<Object> object, uint32_t index);
Steve Blocka7e24c12009-10-30 11:49:00 +0000435
436 static Object* SetObjectProperty(Handle<Object> object,
437 Handle<Object> key,
438 Handle<Object> value,
439 PropertyAttributes attr);
440
441 static Object* ForceSetObjectProperty(Handle<JSObject> object,
442 Handle<Object> key,
443 Handle<Object> value,
444 PropertyAttributes attr);
445
446 static Object* ForceDeleteObjectProperty(Handle<JSObject> object,
447 Handle<Object> key);
448
449 static Object* GetObjectProperty(Handle<Object> object, Handle<Object> key);
450
451 // This function is used in FunctionNameUsing* tests.
452 static Object* FindSharedFunctionInfoInScript(Handle<Script> script,
453 int position);
454
455 // Helper functions used stubs.
456 static void PerformGC(Object* result);
457};
458
459
460} } // namespace v8::internal
461
462#endif // V8_RUNTIME_H_