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

Side by Side Diff: src/runtime.h

Issue 7535004: Merge bleeding edge up to 8774 into the GC branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 4 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/rewriter.cc ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 F(NumberToRadixString, 2, 1) \ 203 F(NumberToRadixString, 2, 1) \
204 F(NumberToFixed, 2, 1) \ 204 F(NumberToFixed, 2, 1) \
205 F(NumberToExponential, 2, 1) \ 205 F(NumberToExponential, 2, 1) \
206 F(NumberToPrecision, 2, 1) 206 F(NumberToPrecision, 2, 1)
207 207
208 #define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ 208 #define RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
209 /* Reflection */ \ 209 /* Reflection */ \
210 F(FunctionSetInstanceClassName, 2, 1) \ 210 F(FunctionSetInstanceClassName, 2, 1) \
211 F(FunctionSetLength, 2, 1) \ 211 F(FunctionSetLength, 2, 1) \
212 F(FunctionSetPrototype, 2, 1) \ 212 F(FunctionSetPrototype, 2, 1) \
213 F(FunctionSetReadOnlyPrototype, 1, 1) \
213 F(FunctionGetName, 1, 1) \ 214 F(FunctionGetName, 1, 1) \
214 F(FunctionSetName, 2, 1) \ 215 F(FunctionSetName, 2, 1) \
215 F(FunctionSetBound, 1, 1) \ 216 F(FunctionSetBound, 1, 1) \
216 F(FunctionRemovePrototype, 1, 1) \ 217 F(FunctionRemovePrototype, 1, 1) \
217 F(FunctionGetSourceCode, 1, 1) \ 218 F(FunctionGetSourceCode, 1, 1) \
218 F(FunctionGetScript, 1, 1) \ 219 F(FunctionGetScript, 1, 1) \
219 F(FunctionGetScriptSourcePosition, 1, 1) \ 220 F(FunctionGetScriptSourcePosition, 1, 1) \
220 F(FunctionGetPositionForOffset, 2, 1) \ 221 F(FunctionGetPositionForOffset, 2, 1) \
221 F(FunctionIsAPIFunction, 1, 1) \ 222 F(FunctionIsAPIFunction, 1, 1) \
222 F(FunctionIsBuiltin, 1, 1) \ 223 F(FunctionIsBuiltin, 1, 1) \
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 F(CloneShallowLiteralBoilerplate, 1, 1) \ 278 F(CloneShallowLiteralBoilerplate, 1, 1) \
278 F(CreateObjectLiteral, 4, 1) \ 279 F(CreateObjectLiteral, 4, 1) \
279 F(CreateObjectLiteralShallow, 4, 1) \ 280 F(CreateObjectLiteralShallow, 4, 1) \
280 F(CreateArrayLiteral, 3, 1) \ 281 F(CreateArrayLiteral, 3, 1) \
281 F(CreateArrayLiteralShallow, 3, 1) \ 282 F(CreateArrayLiteralShallow, 3, 1) \
282 \ 283 \
283 /* Harmony proxies */ \ 284 /* Harmony proxies */ \
284 F(CreateJSProxy, 2, 1) \ 285 F(CreateJSProxy, 2, 1) \
285 F(IsJSProxy, 1, 1) \ 286 F(IsJSProxy, 1, 1) \
286 F(GetHandler, 1, 1) \ 287 F(GetHandler, 1, 1) \
288 F(Fix, 1, 1) \
287 \ 289 \
288 /* Statements */ \ 290 /* Statements */ \
289 F(NewClosure, 3, 1) \ 291 F(NewClosure, 3, 1) \
290 F(NewObject, 1, 1) \ 292 F(NewObject, 1, 1) \
291 F(NewObjectFromBound, 2, 1) \ 293 F(NewObjectFromBound, 2, 1) \
292 F(FinalizeInstanceSize, 1, 1) \ 294 F(FinalizeInstanceSize, 1, 1) \
293 F(Throw, 1, 1) \ 295 F(Throw, 1, 1) \
294 F(ReThrow, 1, 1) \ 296 F(ReThrow, 1, 1) \
295 F(ThrowReferenceError, 1, 1) \ 297 F(ThrowReferenceError, 1, 1) \
296 F(StackGuard, 0, 1) \ 298 F(StackGuard, 0, 1) \
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 F(HasDictionaryElements, 1, 1) \ 344 F(HasDictionaryElements, 1, 1) \
343 F(HasExternalPixelElements, 1, 1) \ 345 F(HasExternalPixelElements, 1, 1) \
344 F(HasExternalArrayElements, 1, 1) \ 346 F(HasExternalArrayElements, 1, 1) \
345 F(HasExternalByteElements, 1, 1) \ 347 F(HasExternalByteElements, 1, 1) \
346 F(HasExternalUnsignedByteElements, 1, 1) \ 348 F(HasExternalUnsignedByteElements, 1, 1) \
347 F(HasExternalShortElements, 1, 1) \ 349 F(HasExternalShortElements, 1, 1) \
348 F(HasExternalUnsignedShortElements, 1, 1) \ 350 F(HasExternalUnsignedShortElements, 1, 1) \
349 F(HasExternalIntElements, 1, 1) \ 351 F(HasExternalIntElements, 1, 1) \
350 F(HasExternalUnsignedIntElements, 1, 1) \ 352 F(HasExternalUnsignedIntElements, 1, 1) \
351 F(HasExternalFloatElements, 1, 1) \ 353 F(HasExternalFloatElements, 1, 1) \
352 F(HasExternalDoubleElements, 1, 1) 354 F(HasExternalDoubleElements, 1, 1) \
355 /* profiler */ \
356 F(ProfilerResume, 0, 1) \
357 F(ProfilerPause, 0, 1)
353 358
354 359
355 #ifdef ENABLE_DEBUGGER_SUPPORT 360 #ifdef ENABLE_DEBUGGER_SUPPORT
356 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ 361 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \
357 /* Debugger support*/ \ 362 /* Debugger support*/ \
358 F(DebugBreak, 0, 1) \ 363 F(DebugBreak, 0, 1) \
359 F(SetDebugEventListener, 2, 1) \ 364 F(SetDebugEventListener, 2, 1) \
360 F(Break, 0, 1) \ 365 F(Break, 0, 1) \
361 F(DebugGetPropertyDetails, 2, 1) \ 366 F(DebugGetPropertyDetails, 2, 1) \
362 F(DebugGetProperty, 2, 1) \ 367 F(DebugGetProperty, 2, 1) \
363 F(DebugPropertyTypeFromDetails, 1, 1) \ 368 F(DebugPropertyTypeFromDetails, 1, 1) \
364 F(DebugPropertyAttributesFromDetails, 1, 1) \ 369 F(DebugPropertyAttributesFromDetails, 1, 1) \
365 F(DebugPropertyIndexFromDetails, 1, 1) \ 370 F(DebugPropertyIndexFromDetails, 1, 1) \
366 F(DebugNamedInterceptorPropertyValue, 2, 1) \ 371 F(DebugNamedInterceptorPropertyValue, 2, 1) \
367 F(DebugIndexedInterceptorElementValue, 2, 1) \ 372 F(DebugIndexedInterceptorElementValue, 2, 1) \
368 F(CheckExecutionState, 1, 1) \ 373 F(CheckExecutionState, 1, 1) \
369 F(GetFrameCount, 1, 1) \ 374 F(GetFrameCount, 1, 1) \
370 F(GetFrameDetails, 2, 1) \ 375 F(GetFrameDetails, 2, 1) \
371 F(GetScopeCount, 2, 1) \ 376 F(GetScopeCount, 2, 1) \
372 F(GetScopeDetails, 3, 1) \ 377 F(GetScopeDetails, 4, 1) \
373 F(DebugPrintScopes, 0, 1) \ 378 F(DebugPrintScopes, 0, 1) \
374 F(GetThreadCount, 1, 1) \ 379 F(GetThreadCount, 1, 1) \
375 F(GetThreadDetails, 2, 1) \ 380 F(GetThreadDetails, 2, 1) \
376 F(SetDisableBreak, 1, 1) \ 381 F(SetDisableBreak, 1, 1) \
377 F(GetBreakLocations, 1, 1) \ 382 F(GetBreakLocations, 1, 1) \
378 F(SetFunctionBreakPoint, 3, 1) \ 383 F(SetFunctionBreakPoint, 3, 1) \
379 F(SetScriptBreakPoint, 3, 1) \ 384 F(SetScriptBreakPoint, 3, 1) \
380 F(ClearBreakPoint, 1, 1) \ 385 F(ClearBreakPoint, 1, 1) \
381 F(ChangeBreakOnException, 2, 1) \ 386 F(ChangeBreakOnException, 2, 1) \
382 F(IsBreakOnException, 1, 1) \ 387 F(IsBreakOnException, 1, 1) \
383 F(PrepareStep, 3, 1) \ 388 F(PrepareStep, 3, 1) \
384 F(ClearStepping, 0, 1) \ 389 F(ClearStepping, 0, 1) \
385 F(DebugEvaluate, 5, 1) \ 390 F(DebugEvaluate, 6, 1) \
386 F(DebugEvaluateGlobal, 4, 1) \ 391 F(DebugEvaluateGlobal, 4, 1) \
387 F(DebugGetLoadedScripts, 0, 1) \ 392 F(DebugGetLoadedScripts, 0, 1) \
388 F(DebugReferencedBy, 3, 1) \ 393 F(DebugReferencedBy, 3, 1) \
389 F(DebugConstructedBy, 2, 1) \ 394 F(DebugConstructedBy, 2, 1) \
390 F(DebugGetPrototype, 1, 1) \ 395 F(DebugGetPrototype, 1, 1) \
391 F(SystemBreak, 0, 1) \ 396 F(SystemBreak, 0, 1) \
392 F(DebugDisassembleFunction, 1, 1) \ 397 F(DebugDisassembleFunction, 1, 1) \
393 F(DebugDisassembleConstructor, 1, 1) \ 398 F(DebugDisassembleConstructor, 1, 1) \
394 F(FunctionGetInferredName, 1, 1) \ 399 F(FunctionGetInferredName, 1, 1) \
395 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \ 400 F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \
(...skipping 24 matching lines...) Expand all
420 F(GetLOLPath, 3, 1) \ 425 F(GetLOLPath, 3, 1) \
421 F(InfoLOL, 2, 1) \ 426 F(InfoLOL, 2, 1) \
422 F(PrintLOLObj, 1, 1) \ 427 F(PrintLOLObj, 1, 1) \
423 F(ResetLOL, 0, 1) \ 428 F(ResetLOL, 0, 1) \
424 F(SummarizeLOL, 3, 1) 429 F(SummarizeLOL, 3, 1)
425 430
426 #else 431 #else
427 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) 432 #define RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
428 #endif 433 #endif
429 434
430 #ifdef ENABLE_LOGGING_AND_PROFILING
431 #define RUNTIME_FUNCTION_LIST_PROFILER_SUPPORT(F) \
432 F(ProfilerResume, 0, 1) \
433 F(ProfilerPause, 0, 1)
434 #else
435 #define RUNTIME_FUNCTION_LIST_PROFILER_SUPPORT(F)
436 #endif
437
438 #ifdef DEBUG 435 #ifdef DEBUG
439 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \ 436 #define RUNTIME_FUNCTION_LIST_DEBUG(F) \
440 /* Testing */ \ 437 /* Testing */ \
441 F(ListNatives, 0, 1) 438 F(ListNatives, 0, 1)
442 #else 439 #else
443 #define RUNTIME_FUNCTION_LIST_DEBUG(F) 440 #define RUNTIME_FUNCTION_LIST_DEBUG(F)
444 #endif 441 #endif
445 442
446 // ---------------------------------------------------------------------------- 443 // ----------------------------------------------------------------------------
447 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed 444 // RUNTIME_FUNCTION_LIST defines all runtime functions accessed
448 // either directly by id (via the code generator), or indirectly 445 // either directly by id (via the code generator), or indirectly
449 // via a native call by name (from within JS code). 446 // via a native call by name (from within JS code).
450 447
451 #define RUNTIME_FUNCTION_LIST(F) \ 448 #define RUNTIME_FUNCTION_LIST(F) \
452 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \ 449 RUNTIME_FUNCTION_LIST_ALWAYS_1(F) \
453 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \ 450 RUNTIME_FUNCTION_LIST_ALWAYS_2(F) \
454 RUNTIME_FUNCTION_LIST_DEBUG(F) \ 451 RUNTIME_FUNCTION_LIST_DEBUG(F) \
455 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F) \ 452 RUNTIME_FUNCTION_LIST_DEBUGGER_SUPPORT(F)
456 RUNTIME_FUNCTION_LIST_PROFILER_SUPPORT(F)
457 453
458 // ---------------------------------------------------------------------------- 454 // ----------------------------------------------------------------------------
459 // INLINE_FUNCTION_LIST defines all inlined functions accessed 455 // INLINE_FUNCTION_LIST defines all inlined functions accessed
460 // with a native call of the form %_name from within JS code. 456 // with a native call of the form %_name from within JS code.
461 // Entries have the form F(name, number of arguments, number of return values). 457 // Entries have the form F(name, number of arguments, number of return values).
462 #define INLINE_FUNCTION_LIST(F) \ 458 #define INLINE_FUNCTION_LIST(F) \
463 F(IsSmi, 1, 1) \ 459 F(IsSmi, 1, 1) \
464 F(IsNonNegativeSmi, 1, 1) \ 460 F(IsNonNegativeSmi, 1, 1) \
465 F(IsArray, 1, 1) \ 461 F(IsArray, 1, 1) \
466 F(IsRegExp, 1, 1) \ 462 F(IsRegExp, 1, 1) \
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 631
636 MUST_USE_RESULT static MaybeObject* ForceSetObjectProperty( 632 MUST_USE_RESULT static MaybeObject* ForceSetObjectProperty(
637 Isolate* isolate, 633 Isolate* isolate,
638 Handle<JSObject> object, 634 Handle<JSObject> object,
639 Handle<Object> key, 635 Handle<Object> key,
640 Handle<Object> value, 636 Handle<Object> value,
641 PropertyAttributes attr); 637 PropertyAttributes attr);
642 638
643 MUST_USE_RESULT static MaybeObject* ForceDeleteObjectProperty( 639 MUST_USE_RESULT static MaybeObject* ForceDeleteObjectProperty(
644 Isolate* isolate, 640 Isolate* isolate,
645 Handle<JSObject> object, 641 Handle<JSReceiver> object,
646 Handle<Object> key); 642 Handle<Object> key);
647 643
648 MUST_USE_RESULT static MaybeObject* GetObjectProperty( 644 MUST_USE_RESULT static MaybeObject* GetObjectProperty(
649 Isolate* isolate, 645 Isolate* isolate,
650 Handle<Object> object, 646 Handle<Object> object,
651 Handle<Object> key); 647 Handle<Object> key);
652 648
653 // This function is used in FunctionNameUsing* tests. 649 // This function is used in FunctionNameUsing* tests.
654 static Object* FindSharedFunctionInfoInScript(Isolate* isolate, 650 static Object* FindSharedFunctionInfoInScript(Isolate* isolate,
655 Handle<Script> script, 651 Handle<Script> script,
656 int position); 652 int position);
657 653
658 // Helper functions used stubs. 654 // Helper functions used stubs.
659 static void PerformGC(Object* result); 655 static void PerformGC(Object* result);
660 }; 656 };
661 657
662 } } // namespace v8::internal 658 } } // namespace v8::internal
663 659
664 #endif // V8_RUNTIME_H_ 660 #endif // V8_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698