1 // Copyright 2011 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
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.
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.
31 #include "allocation.h"
37 // The interface to C++ runtime functions.
39 // ----------------------------------------------------------------------------
40 // RUNTIME_FUNCTION_LIST_ALWAYS defines runtime calls available in both
41 // release and debug mode.
42 // This macro should only be used by the macro RUNTIME_FUNCTION_LIST.
44 // WARNING: RUNTIME_FUNCTION_LIST_ALWAYS_* is a very large macro that caused
45 // MSVC Intellisense to crash. It was broken into two macros to work around
46 // this problem. Please avoid large recursive macros whenever possible.
47 #define RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
48 /* Property access */ \
49 F(GetProperty, 2, 1) \
50 F(KeyedGetProperty, 2, 1) \
51 F(DeleteProperty, 3, 1) \
52 F(HasLocalProperty, 2, 1) \
53 F(HasProperty, 2, 1) \
55 F(IsPropertyEnumerable, 2, 1) \
56 F(GetPropertyNames, 1, 1) \
57 F(GetPropertyNamesFast, 1, 1) \
58 F(GetLocalPropertyNames, 1, 1) \
59 F(GetLocalElementNames, 1, 1) \
60 F(GetInterceptorInfo, 1, 1) \
61 F(GetNamedInterceptorPropertyNames, 1, 1) \
62 F(GetIndexedInterceptorElementNames, 1, 1) \
63 F(GetArgumentsProperty, 1, 1) \
64 F(ToFastProperties, 1, 1) \
65 F(ToSlowProperties, 1, 1) \
66 F(FinishArrayPrototypeSetup, 1, 1) \
67 F(SpecialArrayFunctions, 1, 1) \
68 F(GetDefaultReceiver, 1, 1) \
70 F(GetPrototype, 1, 1) \
71 F(IsInPrototypeChain, 2, 1) \
72 F(SetHiddenPrototype, 2, 1) \
74 F(IsConstructCall, 0, 1) \
76 F(GetOwnProperty, 2, 1) \
78 F(IsExtensible, 1, 1) \
79 F(PreventExtensions, 1, 1)\
82 F(CheckIsBootstrapping, 0, 1) \
84 F(GetFunctionDelegate, 1, 1) \
85 F(GetConstructorDelegate, 1, 1) \
86 F(NewArgumentsFast, 3, 1) \
87 F(NewStrictArgumentsFast, 3, 1) \
88 F(LazyCompile, 1, 1) \
89 F(LazyRecompile, 1, 1) \
90 F(NotifyDeoptimized, 1, 1) \
92 F(DeoptimizeFunction, 1, 1) \
93 F(RunningInSimulator, 0, 1) \
94 F(OptimizeFunctionOnNextCall, 1, 1) \
95 F(GetOptimizationStatus, 1, 1) \
96 F(GetOptimizationCount, 1, 1) \
97 F(CompileForOnStackReplacement, 1, 1) \
98 F(SetNewFunctionAttributes, 1, 1) \
99 F(AllocateInNewSpace, 1, 1) \
100 F(SetNativeFlag, 1, 1) \
102 /* Array join support */ \
103 F(PushIfAbsent, 2, 1) \
104 F(ArrayConcat, 1, 1) \
110 F(StringToNumber, 1, 1) \
111 F(StringFromCharCodeArray, 1, 1) \
112 F(StringParseInt, 2, 1) \
113 F(StringParseFloat, 1, 1) \
114 F(StringToLowerCase, 1, 1) \
115 F(StringToUpperCase, 1, 1) \
116 F(StringSplit, 3, 1) \
117 F(CharFromCode, 1, 1) \
119 F(URIUnescape, 1, 1) \
120 F(QuoteJSONString, 1, 1) \
121 F(QuoteJSONStringComma, 1, 1) \
122 F(QuoteJSONStringArray, 1, 1) \
124 F(NumberToString, 1, 1) \
125 F(NumberToStringSkipCache, 1, 1) \
126 F(NumberToInteger, 1, 1) \
127 F(NumberToIntegerMapMinusZero, 1, 1) \
128 F(NumberToJSUint32, 1, 1) \
129 F(NumberToJSInt32, 1, 1) \
130 F(NumberToSmi, 1, 1) \
131 F(AllocateHeapNumber, 0, 1) \
133 /* Arithmetic operations */ \
139 F(NumberUnaryMinus, 1, 1) \
140 F(NumberAlloc, 0, 1) \
143 F(StringBuilderConcat, 3, 1) \
144 F(StringBuilderJoin, 3, 1) \
145 F(SparseJoinWithSeparator, 3, 1) \
147 /* Bit operations */ \
158 F(NumberEquals, 2, 1) \
159 F(StringEquals, 2, 1) \
161 F(NumberCompare, 3, 1) \
162 F(SmiLexicographicCompare, 2, 1) \
163 F(StringCompare, 2, 1) \
169 F(Math_atan2, 2, 1) \
173 F(Math_floor, 1, 1) \
176 F(Math_pow_cfunction, 2, 1) \
177 F(RoundNumber, 1, 1) \
182 /* Regular expressions */ \
183 F(RegExpCompile, 3, 1) \
184 F(RegExpExec, 4, 1) \
185 F(RegExpExecMultiple, 4, 1) \
186 F(RegExpInitializeObject, 5, 1) \
187 F(RegExpConstructResult, 3, 1) \
193 F(StringCharCodeAt, 2, 1) \
194 F(StringIndexOf, 3, 1) \
195 F(StringLastIndexOf, 3, 1) \
196 F(StringLocaleCompare, 2, 1) \
198 F(StringReplaceRegExpWithString, 4, 1) \
199 F(StringMatch, 3, 1) \
200 F(StringTrim, 3, 1) \
201 F(StringToArray, 2, 1) \
202 F(NewStringWrapper, 1, 1) \
205 F(NumberToRadixString, 2, 1) \
206 F(NumberToFixed, 2, 1) \
207 F(NumberToExponential, 2, 1) \
208 F(NumberToPrecision, 2, 1)
210 #define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
212 F(FunctionSetInstanceClassName, 2, 1) \
213 F(FunctionSetLength, 2, 1) \
214 F(FunctionSetPrototype, 2, 1) \
215 F(FunctionSetReadOnlyPrototype, 1, 1) \
216 F(FunctionGetName, 1, 1) \
217 F(FunctionSetName, 2, 1) \
218 F(FunctionNameShouldPrintAsAnonymous, 1, 1) \
219 F(FunctionMarkNameShouldPrintAsAnonymous, 1, 1) \
220 F(FunctionBindArguments, 4, 1) \
221 F(BoundFunctionGetBindings, 1, 1) \
222 F(FunctionRemovePrototype, 1, 1) \
223 F(FunctionGetSourceCode, 1, 1) \
224 F(FunctionGetScript, 1, 1) \
225 F(FunctionGetScriptSourcePosition, 1, 1) \
226 F(FunctionGetPositionForOffset, 2, 1) \
227 F(FunctionIsAPIFunction, 1, 1) \
228 F(FunctionIsBuiltin, 1, 1) \
230 F(CollectStackTrace, 2, 1) \
231 F(GetV8Version, 0, 1) \
235 F(SetExpectedNumberOfProperties, 2, 1) \
237 F(CreateApiFunction, 1, 1) \
238 F(IsTemplate, 1, 1) \
239 F(GetTemplateField, 2, 1) \
240 F(DisableAccessChecks, 1, 1) \
241 F(EnableAccessChecks, 1, 1) \
244 F(DateCurrentTime, 0, 1) \
245 F(DateParseString, 2, 1) \
246 F(DateLocalTimezone, 1, 1) \
247 F(DateLocalTimeOffset, 0, 1) \
248 F(DateDaylightSavingsOffset, 1, 1) \
249 F(DateMakeDay, 3, 1) \
250 F(DateYMDFromTime, 2, 1) \
255 F(CompileString, 1, 1) \
256 F(GlobalPrint, 1, 1) \
259 F(GlobalReceiver, 1, 1) \
260 F(ResolvePossiblyDirectEval, 5, 2) \
261 F(ResolvePossiblyDirectEvalNoLookup, 5, 2) \
263 F(SetProperty, -1 /* 4 or 5 */, 1) \
264 F(DefineOrRedefineDataProperty, 4, 1) \
265 F(DefineOrRedefineAccessorProperty, 5, 1) \
266 F(IgnoreAttributesAndSetProperty, -1 /* 3 or 4 */, 1) \
269 F(RemoveArrayHoles, 2, 1) \
270 F(GetArrayKeys, 2, 1) \
271 F(MoveArrayContents, 2, 1) \
272 F(EstimateNumberOfElements, 1, 1) \
273 F(SwapElements, 3, 1) \
275 /* Getters and Setters */ \
276 F(DefineAccessor, -1 /* 4 or 5 */, 1) \
277 F(LookupAccessor, 3, 1) \
280 F(MaterializeRegExpLiteral, 4, 1)\
281 F(CreateArrayLiteralBoilerplate, 4, 1) \
282 F(CloneLiteralBoilerplate, 1, 1) \
283 F(CloneShallowLiteralBoilerplate, 1, 1) \
284 F(CreateObjectLiteral, 4, 1) \
285 F(CreateObjectLiteralShallow, 4, 1) \
286 F(CreateArrayLiteral, 3, 1) \
287 F(CreateArrayLiteralShallow, 3, 1) \
289 /* Harmony proxies */ \
290 F(CreateJSProxy, 2, 1) \
291 F(CreateJSFunctionProxy, 4, 1) \
293 F(IsJSFunctionProxy, 1, 1) \
294 F(GetHandler, 1, 1) \
295 F(GetCallTrap, 1, 1) \
296 F(GetConstructTrap, 1, 1) \
300 F(SetInitialize, 1, 1) \
306 F(MapInitialize, 1, 1) \
310 /* Harmony weakmaps */ \
311 F(WeakMapInitialize, 1, 1) \
312 F(WeakMapGet, 2, 1) \
313 F(WeakMapSet, 3, 1) \
316 F(NewClosure, 3, 1) \
318 F(NewObjectFromBound, 1, 1) \
319 F(FinalizeInstanceSize, 1, 1) \
322 F(ThrowReferenceError, 1, 1) \
323 F(StackGuard, 0, 1) \
324 F(PromoteScheduledException, 0, 1) \
327 F(NewFunctionContext, 1, 1) \
328 F(PushWithContext, 2, 1) \
329 F(PushCatchContext, 3, 1) \
330 F(PushBlockContext, 2, 1) \
331 F(DeleteContextSlot, 2, 1) \
332 F(LoadContextSlot, 2, 2) \
333 F(LoadContextSlotNoReferenceError, 2, 2) \
334 F(StoreContextSlot, 4, 1) \
336 /* Declarations and initialization */ \
337 F(DeclareGlobals, 3, 1) \
338 F(DeclareContextSlot, 4, 1) \
339 F(InitializeVarGlobal, -1 /* 3 or 4 */, 1) \
340 F(InitializeConstGlobal, 3, 1) \
341 F(InitializeConstContextSlot, 3, 1) \
342 F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
345 F(DebugPrint, 1, 1) \
346 F(DebugTrace, 0, 1) \
347 F(TraceElementsKindTransition, 5, 1) \
348 F(TraceEnter, 0, 1) \
356 F(GetFromCache, 2, 1) \
358 /* Message objects */ \
359 F(NewMessageObject, 2, 1) \
360 F(MessageGetType, 1, 1) \
361 F(MessageGetArguments, 1, 1) \
362 F(MessageGetStartPosition, 1, 1) \
363 F(MessageGetScript, 1, 1) \
365 /* Pseudo functions - handled as macros by parser */ \
368 /* expose boolean functions from objects-inl.h */ \
369 F(HasFastSmiOnlyElements, 1, 1) \
370 F(HasFastElements, 1, 1) \
371 F(HasFastDoubleElements, 1, 1) \
372 F(HasDictionaryElements, 1, 1) \
373 F(HasExternalPixelElements, 1, 1) \
374 F(HasExternalArrayElements, 1, 1) \
375 F(HasExternalByteElements, 1, 1) \
376 F(HasExternalUnsignedByteElements, 1, 1) \
377 F(HasExternalShortElements, 1, 1) \
378 F(HasExternalUnsignedShortElements, 1, 1) \
379 F(HasExternalIntElements, 1, 1) \
380 F(HasExternalUnsignedIntElements, 1, 1) \
381 F(HasExternalFloatElements, 1, 1) \
382 F(HasExternalDoubleElements, 1, 1) \
383 F(TransitionElementsSmiToDouble, 1, 1) \
384 F(TransitionElementsDoubleToObject, 1, 1) \
385 F(HaveSameMap, 2, 1) \
387 F(ProfilerResume, 0, 1) \
388 F(ProfilerPause, 0, 1)
391 #ifdef ENABLE_DEBUGGER_SUPPORT
392 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
393 /* Debugger support*/ \
394 F(DebugBreak, 0, 1) \
395 F(SetDebugEventListener, 2, 1) \
397 F(DebugGetPropertyDetails, 2, 1) \
398 F(DebugGetProperty, 2, 1) \
399 F(DebugPropertyTypeFromDetails, 1, 1) \
400 F(DebugPropertyAttributesFromDetails, 1, 1) \
401 F(DebugPropertyIndexFromDetails, 1, 1) \
402 F(DebugNamedInterceptorPropertyValue, 2, 1) \
403 F(DebugIndexedInterceptorElementValue, 2, 1) \
404 F(CheckExecutionState, 1, 1) \
405 F(GetFrameCount, 1, 1) \
406 F(GetFrameDetails, 2, 1) \
407 F(GetScopeCount, 2, 1) \
408 F(GetScopeDetails, 4, 1) \
409 F(DebugPrintScopes, 0, 1) \
410 F(GetThreadCount, 1, 1) \
411 F(GetThreadDetails, 2, 1) \
412 F(SetDisableBreak, 1, 1) \
413 F(GetBreakLocations, 1, 1) \
414 F(SetFunctionBreakPoint, 3, 1) \
415 F(SetScriptBreakPoint, 3, 1) \
416 F(ClearBreakPoint, 1, 1) \
417 F(ChangeBreakOnException, 2, 1) \
418 F(IsBreakOnException, 1, 1) \
419 F(PrepareStep, 3, 1) \
420 F(ClearStepping, 0, 1) \
421 F(DebugEvaluate, 6, 1) \
422 F(DebugEvaluateGlobal, 4, 1) \
423 F(DebugGetLoadedScripts, 0, 1) \
424 F(DebugReferencedBy, 3, 1) \
425 F(DebugConstructedBy, 2, 1) \
426 F(DebugGetPrototype, 1, 1) \
427 F(SystemBreak, 0, 1) \
428 F(DebugDisassembleFunction, 1, 1) \
429 F(DebugDisassembleConstructor, 1, 1) \
430 F(FunctionGetInferredName, 1, 1) \
431 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \
432 F(LiveEditGatherCompileInfo, 2, 1) \
433 F(LiveEditReplaceScript, 3, 1) \
434 F(LiveEditReplaceFunctionCode, 2, 1) \
435 F(LiveEditFunctionSourceUpdated, 1, 1) \
436 F(LiveEditFunctionSetScript, 2, 1) \
437 F(LiveEditReplaceRefToNestedFunction, 3, 1) \
438 F(LiveEditPatchFunctionPositions, 2, 1) \
439 F(LiveEditCheckAndDropActivations, 2, 1) \
440 F(LiveEditCompareStrings, 2, 1) \
441 F(GetFunctionCodePositionFromSource, 2, 1) \
442 F(ExecuteInDebugContext, 2, 1) \
445 F(CollectGarbage, 1, 1) \
446 F(GetHeapUsage, 0, 1) \
448 /* LiveObjectList support*/ \
449 F(HasLOLEnabled, 0, 1) \
450 F(CaptureLOL, 0, 1) \
454 F(GetLOLObjId, 1, 1) \
455 F(GetLOLObjRetainers, 6, 1) \
456 F(GetLOLPath, 3, 1) \
458 F(PrintLOLObj, 1, 1) \
460 F(SummarizeLOL, 3, 1)
463 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
467 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \
471 #define RUNTIME_FUNCTION_LIST_DEBUG(F)
474 // ----------------------------------------------------------------------------
475 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed
476 // either directly by id (via the code generator), or indirectly
477 // via a native call by name (from within JS code).
479 #define RUNTIME_FUNCTION_LIST(F) \
480 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
481 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
482 RUNTIME_FUNCTION_LIST_DEBUG(F) \
483 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
485 // ----------------------------------------------------------------------------
486 // INLINE_FUNCTION_LIST defines all inlined functions accessed
487 // with a native call of the form %_name from within JS code.
488 // Entries have the form F(name, number of arguments, number of return values).
489 #define INLINE_FUNCTION_LIST(F) \
491 F(IsNonNegativeSmi, 1, 1) \
494 F(CallFunction, -1 /* receiver + n args + function */, 1) \
495 F(ArgumentsLength, 0, 1) \
498 F(SetValueOf, 2, 1) \
499 F(StringCharFromCode, 1, 1) \
500 F(StringCharAt, 2, 1) \
501 F(ObjectEquals, 2, 1) \
502 F(RandomHeapNumber, 0, 1) \
504 F(IsFunction, 1, 1) \
505 F(IsUndetectableObject, 1, 1) \
506 F(IsSpecObject, 1, 1) \
507 F(IsStringWrapperSafeForDefaultValueOf, 1, 1) \
513 F(IsRegExpEquivalent, 2, 1) \
514 F(HasCachedArrayIndex, 1, 1) \
515 F(GetCachedArrayIndex, 1, 1) \
516 F(FastAsciiArrayJoin, 2, 1)
519 // ----------------------------------------------------------------------------
520 // INLINE_AND_RUNTIME_FUNCTION_LIST defines all inlined functions accessed
521 // with a native call of the form %_name from within JS code that also have
522 // a corresponding runtime function, that is called for slow cases.
523 // Entries have the form F(name, number of arguments, number of return values).
524 #define INLINE_RUNTIME_FUNCTION_LIST(F) \
525 F(IsConstructCall, 0, 1) \
527 F(StringCharCodeAt, 2, 1) \
531 F(StringCompare, 2, 1) \
532 F(RegExpExec, 4, 1) \
533 F(RegExpConstructResult, 3, 1) \
534 F(GetFromCache, 2, 1) \
535 F(NumberToString, 1, 1) \
536 F(SwapElements, 3, 1)
539 //---------------------------------------------------------------------------
540 // Runtime provides access to all C++ runtime functions.
544 StaticResource<StringInputBuffer>* string_input_buffer() {
545 return &string_input_buffer_;
547 unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() {
548 return &to_upper_mapping_;
550 unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() {
551 return &to_lower_mapping_;
553 StringInputBuffer* string_input_buffer_compare_bufx() {
554 return &string_input_buffer_compare_bufx_;
556 StringInputBuffer* string_input_buffer_compare_bufy() {
557 return &string_input_buffer_compare_bufy_;
559 StringInputBuffer* string_locale_compare_buf1() {
560 return &string_locale_compare_buf1_;
562 StringInputBuffer* string_locale_compare_buf2() {
563 return &string_locale_compare_buf2_;
568 // Non-reentrant string buffer for efficient general use in the runtime.
569 StaticResource<StringInputBuffer> string_input_buffer_;
570 unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_;
571 unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_;
572 StringInputBuffer string_input_buffer_compare_bufx_;
573 StringInputBuffer string_input_buffer_compare_bufy_;
574 StringInputBuffer string_locale_compare_buf1_;
575 StringInputBuffer string_locale_compare_buf2_;
577 friend class Isolate;
578 friend class Runtime;
580 DISALLOW_COPY_AND_ASSIGN(RuntimeState);
584 class Runtime : public AllStatic {
587 #define F(name, nargs, ressize) k##name,
588 RUNTIME_FUNCTION_LIST(F)
590 #define F(name, nargs, ressize) kInline##name,
591 INLINE_FUNCTION_LIST(F)
592 INLINE_RUNTIME_FUNCTION_LIST(F)
595 kFirstInlineFunction = kInlineIsSmi
603 // Intrinsic function descriptor.
605 FunctionId function_id;
606 IntrinsicType intrinsic_type;
607 // The JS name of the function.
610 // The C++ (native) entry point. NULL if the function is inlined.
613 // The number of arguments expected. nargs is -1 if the function takes
614 // a variable number of arguments.
616 // Size of result. Most functions return a single pointer, size 1.
620 static const int kNotFound = -1;
622 // Add symbols for all the intrinsic function names to a StringDictionary.
623 // Returns failure if an allocation fails. In this case, it must be
624 // retried with a new, empty StringDictionary, not with the same one.
625 // Alternatively, heap initialization can be completely restarted.
626 MUST_USE_RESULT static MaybeObject* InitializeIntrinsicFunctionNames(
627 Heap* heap, Object* dictionary);
629 // Get the intrinsic function with the given name, which must be a symbol.
630 static const Function* FunctionForSymbol(Handle<String> name);
632 // Get the intrinsic function with the given FunctionId.
633 static const Function* FunctionForId(FunctionId id);
635 // General-purpose helper functions for runtime system.
636 static int StringMatch(Isolate* isolate,
641 static bool IsUpperCaseChar(RuntimeState* runtime_state, uint16_t ch);
643 // TODO(1240886): Some of the following methods are *not* handle safe, but
644 // accept handle arguments. This seems fragile.
646 // Support getting the characters in a string using [] notation as
647 // in Firefox/SpiderMonkey, Safari and Opera.
648 MUST_USE_RESULT static MaybeObject* GetElementOrCharAt(Isolate* isolate,
649 Handle<Object> object,
652 MUST_USE_RESULT static MaybeObject* SetObjectProperty(
654 Handle<Object> object,
656 Handle<Object> value,
657 PropertyAttributes attr,
658 StrictModeFlag strict_mode);
660 MUST_USE_RESULT static MaybeObject* ForceSetObjectProperty(
662 Handle<JSObject> object,
664 Handle<Object> value,
665 PropertyAttributes attr);
667 MUST_USE_RESULT static MaybeObject* ForceDeleteObjectProperty(
669 Handle<JSReceiver> object,
672 MUST_USE_RESULT static MaybeObject* GetObjectProperty(
674 Handle<Object> object,
677 // This function is used in FunctionNameUsing* tests.
678 static Object* FindSharedFunctionInfoInScript(Isolate* isolate,
679 Handle<Script> script,
682 // Helper functions used stubs.
683 static void PerformGC(Object* result);
687 //---------------------------------------------------------------------------
688 // Constants used by interface to runtime functions.
690 class DeclareGlobalsEvalFlag: public BitField<bool, 0, 1> {};
691 class DeclareGlobalsStrictModeFlag: public BitField<StrictModeFlag, 1, 1> {};
692 class DeclareGlobalsNativeFlag: public BitField<bool, 2, 1> {};
694 } } // namespace v8::internal
696 #endif // V8_RUNTIME_H_