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

Side by Side Diff: src/runtime/runtime.h

Issue 1269323003: Cleanup unnecessary duplication of runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adapt test case. Created 5 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
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/runtime/runtime-maths.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_RUNTIME_H_ 5 #ifndef V8_RUNTIME_RUNTIME_H_
6 #define V8_RUNTIME_RUNTIME_H_ 6 #define V8_RUNTIME_RUNTIME_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/zone.h" 10 #include "src/zone.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 F(MathAtan, 1, 1) \ 377 F(MathAtan, 1, 1) \
378 F(MathLogRT, 1, 1) \ 378 F(MathLogRT, 1, 1) \
379 F(DoubleHi, 1, 1) \ 379 F(DoubleHi, 1, 1) \
380 F(DoubleLo, 1, 1) \ 380 F(DoubleLo, 1, 1) \
381 F(ConstructDouble, 2, 1) \ 381 F(ConstructDouble, 2, 1) \
382 F(RemPiO2, 2, 1) \ 382 F(RemPiO2, 2, 1) \
383 F(MathAtan2, 2, 1) \ 383 F(MathAtan2, 2, 1) \
384 F(MathExpRT, 1, 1) \ 384 F(MathExpRT, 1, 1) \
385 F(MathClz32, 1, 1) \ 385 F(MathClz32, 1, 1) \
386 F(MathFloor, 1, 1) \ 386 F(MathFloor, 1, 1) \
387 F(MathPowSlow, 2, 1) \ 387 F(MathPow, 2, 1) \
388 F(MathPowRT, 2, 1) \ 388 F(MathPowRT, 2, 1) \
389 F(RoundNumber, 1, 1) \ 389 F(RoundNumber, 1, 1) \
390 F(MathSqrt, 1, 1) \ 390 F(MathSqrt, 1, 1) \
391 F(MathFround, 1, 1) \ 391 F(MathFround, 1, 1) \
392 F(MathPow, 2, 1) \
393 F(IsMinusZero, 1, 1) 392 F(IsMinusZero, 1, 1)
394 393
395 394
396 #define FOR_EACH_INTRINSIC_NUMBERS(F) \ 395 #define FOR_EACH_INTRINSIC_NUMBERS(F) \
397 F(NumberToRadixString, 2, 1) \ 396 F(NumberToRadixString, 2, 1) \
398 F(NumberToFixed, 2, 1) \ 397 F(NumberToFixed, 2, 1) \
399 F(NumberToExponential, 2, 1) \ 398 F(NumberToExponential, 2, 1) \
400 F(NumberToPrecision, 2, 1) \ 399 F(NumberToPrecision, 2, 1) \
401 F(IsValidSmi, 1, 1) \ 400 F(IsValidSmi, 1, 1) \
402 F(StringToNumber, 1, 1) \ 401 F(StringToNumber, 1, 1) \
403 F(StringParseInt, 2, 1) \ 402 F(StringParseInt, 2, 1) \
404 F(StringParseFloat, 1, 1) \ 403 F(StringParseFloat, 1, 1) \
405 F(NumberToStringRT, 1, 1) \ 404 F(NumberToString, 1, 1) \
406 F(NumberToStringSkipCache, 1, 1) \ 405 F(NumberToStringSkipCache, 1, 1) \
407 F(NumberToInteger, 1, 1) \ 406 F(NumberToInteger, 1, 1) \
408 F(NumberToIntegerMapMinusZero, 1, 1) \ 407 F(NumberToIntegerMapMinusZero, 1, 1) \
409 F(NumberToJSUint32, 1, 1) \ 408 F(NumberToJSUint32, 1, 1) \
410 F(NumberToJSInt32, 1, 1) \ 409 F(NumberToJSInt32, 1, 1) \
411 F(NumberToSmi, 1, 1) \ 410 F(NumberToSmi, 1, 1) \
412 F(NumberAdd, 2, 1) \ 411 F(NumberAdd, 2, 1) \
413 F(NumberSub, 2, 1) \ 412 F(NumberSub, 2, 1) \
414 F(NumberMul, 2, 1) \ 413 F(NumberMul, 2, 1) \
415 F(NumberUnaryMinus, 1, 1) \ 414 F(NumberUnaryMinus, 1, 1) \
416 F(NumberDiv, 2, 1) \ 415 F(NumberDiv, 2, 1) \
417 F(NumberMod, 2, 1) \ 416 F(NumberMod, 2, 1) \
418 F(NumberImul, 2, 1) \ 417 F(NumberImul, 2, 1) \
419 F(NumberOr, 2, 1) \ 418 F(NumberOr, 2, 1) \
420 F(NumberAnd, 2, 1) \ 419 F(NumberAnd, 2, 1) \
421 F(NumberXor, 2, 1) \ 420 F(NumberXor, 2, 1) \
422 F(NumberShl, 2, 1) \ 421 F(NumberShl, 2, 1) \
423 F(NumberShr, 2, 1) \ 422 F(NumberShr, 2, 1) \
424 F(NumberSar, 2, 1) \ 423 F(NumberSar, 2, 1) \
425 F(NumberEquals, 2, 1) \ 424 F(NumberEquals, 2, 1) \
426 F(NumberCompare, 3, 1) \ 425 F(NumberCompare, 3, 1) \
427 F(SmiLexicographicCompare, 2, 1) \ 426 F(SmiLexicographicCompare, 2, 1) \
428 F(MaxSmi, 0, 1) \ 427 F(MaxSmi, 0, 1) \
429 F(NumberToString, 1, 1) \
430 F(IsSmi, 1, 1) \ 428 F(IsSmi, 1, 1) \
431 F(IsNonNegativeSmi, 1, 1) \ 429 F(IsNonNegativeSmi, 1, 1) \
432 F(GetRootNaN, 0, 1) 430 F(GetRootNaN, 0, 1)
433 431
434 432
435 #define FOR_EACH_INTRINSIC_OBJECT(F) \ 433 #define FOR_EACH_INTRINSIC_OBJECT(F) \
436 F(GetPrototype, 1, 1) \ 434 F(GetPrototype, 1, 1) \
437 F(InternalSetPrototype, 2, 1) \ 435 F(InternalSetPrototype, 2, 1) \
438 F(SetPrototype, 2, 1) \ 436 F(SetPrototype, 2, 1) \
439 F(IsInPrototypeChain, 2, 1) \ 437 F(IsInPrototypeChain, 2, 1) \
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 F(GetHandler, 1, 1) \ 519 F(GetHandler, 1, 1) \
522 F(GetCallTrap, 1, 1) \ 520 F(GetCallTrap, 1, 1) \
523 F(GetConstructTrap, 1, 1) \ 521 F(GetConstructTrap, 1, 1) \
524 F(Fix, 1, 1) 522 F(Fix, 1, 1)
525 523
526 524
527 #define FOR_EACH_INTRINSIC_REGEXP(F) \ 525 #define FOR_EACH_INTRINSIC_REGEXP(F) \
528 F(StringReplaceGlobalRegExpWithString, 4, 1) \ 526 F(StringReplaceGlobalRegExpWithString, 4, 1) \
529 F(StringSplit, 3, 1) \ 527 F(StringSplit, 3, 1) \
530 F(RegExpExec, 4, 1) \ 528 F(RegExpExec, 4, 1) \
531 F(RegExpConstructResultRT, 3, 1) \
532 F(RegExpConstructResult, 3, 1) \ 529 F(RegExpConstructResult, 3, 1) \
533 F(RegExpInitializeAndCompile, 3, 1) \ 530 F(RegExpInitializeAndCompile, 3, 1) \
534 F(MaterializeRegExpLiteral, 4, 1) \ 531 F(MaterializeRegExpLiteral, 4, 1) \
535 F(RegExpExecMultiple, 4, 1) \ 532 F(RegExpExecMultiple, 4, 1) \
536 F(RegExpExecReThrow, 4, 1) \ 533 F(RegExpExecReThrow, 4, 1) \
537 F(IsRegExp, 1, 1) 534 F(IsRegExp, 1, 1)
538 535
539 536
540 #define FOR_EACH_INTRINSIC_SCOPES(F) \ 537 #define FOR_EACH_INTRINSIC_SCOPES(F) \
541 F(ThrowConstAssignError, 0, 1) \ 538 F(ThrowConstAssignError, 0, 1) \
(...skipping 13 matching lines...) Expand all
555 F(NewScriptContext, 2, 1) \ 552 F(NewScriptContext, 2, 1) \
556 F(NewFunctionContext, 1, 1) \ 553 F(NewFunctionContext, 1, 1) \
557 F(PushWithContext, 2, 1) \ 554 F(PushWithContext, 2, 1) \
558 F(PushCatchContext, 3, 1) \ 555 F(PushCatchContext, 3, 1) \
559 F(PushBlockContext, 2, 1) \ 556 F(PushBlockContext, 2, 1) \
560 F(IsJSModule, 1, 1) \ 557 F(IsJSModule, 1, 1) \
561 F(PushModuleContext, 2, 1) \ 558 F(PushModuleContext, 2, 1) \
562 F(DeclareModules, 1, 1) \ 559 F(DeclareModules, 1, 1) \
563 F(DeleteLookupSlot, 2, 1) \ 560 F(DeleteLookupSlot, 2, 1) \
564 F(StoreLookupSlot, 4, 1) \ 561 F(StoreLookupSlot, 4, 1) \
565 F(GetArgumentsProperty, 1, 1) \
566 F(ArgumentsLength, 0, 1) \ 562 F(ArgumentsLength, 0, 1) \
567 F(Arguments, 1, 1) 563 F(Arguments, 1, 1)
568 564
569 565
570 #define FOR_EACH_INTRINSIC_SIMD(F) \ 566 #define FOR_EACH_INTRINSIC_SIMD(F) \
571 F(IsSimdValue, 1, 1) \ 567 F(IsSimdValue, 1, 1) \
572 F(SimdToObject, 1, 1) \ 568 F(SimdToObject, 1, 1) \
573 F(SimdEquals, 2, 1) \ 569 F(SimdEquals, 2, 1) \
574 F(SimdSameValue, 2, 1) \ 570 F(SimdSameValue, 2, 1) \
575 F(SimdSameValueZero, 2, 1) \ 571 F(SimdSameValueZero, 2, 1) \
(...skipping 27 matching lines...) Expand all
603 F(Bool16x8ReplaceLane, 3, 1) \ 599 F(Bool16x8ReplaceLane, 3, 1) \
604 F(Int8x16ReplaceLane, 3, 1) \ 600 F(Int8x16ReplaceLane, 3, 1) \
605 F(Bool8x16ReplaceLane, 3, 1) 601 F(Bool8x16ReplaceLane, 3, 1)
606 602
607 603
608 #define FOR_EACH_INTRINSIC_STRINGS(F) \ 604 #define FOR_EACH_INTRINSIC_STRINGS(F) \
609 F(StringReplaceOneCharWithString, 3, 1) \ 605 F(StringReplaceOneCharWithString, 3, 1) \
610 F(StringIndexOf, 3, 1) \ 606 F(StringIndexOf, 3, 1) \
611 F(StringLastIndexOf, 3, 1) \ 607 F(StringLastIndexOf, 3, 1) \
612 F(StringLocaleCompare, 2, 1) \ 608 F(StringLocaleCompare, 2, 1) \
613 F(SubStringRT, 3, 1) \
614 F(SubString, 3, 1) \ 609 F(SubString, 3, 1) \
615 F(StringAddRT, 2, 1) \
616 F(StringAdd, 2, 1) \ 610 F(StringAdd, 2, 1) \
617 F(InternalizeString, 1, 1) \ 611 F(InternalizeString, 1, 1) \
618 F(StringMatch, 3, 1) \ 612 F(StringMatch, 3, 1) \
619 F(StringCharCodeAtRT, 2, 1) \ 613 F(StringCharCodeAtRT, 2, 1) \
620 F(CharFromCode, 1, 1) \ 614 F(CharFromCode, 1, 1) \
621 F(StringCompareRT, 2, 1) \
622 F(StringCompare, 2, 1) \ 615 F(StringCompare, 2, 1) \
623 F(StringBuilderConcat, 3, 1) \ 616 F(StringBuilderConcat, 3, 1) \
624 F(StringBuilderJoin, 3, 1) \ 617 F(StringBuilderJoin, 3, 1) \
625 F(SparseJoinWithSeparator, 3, 1) \ 618 F(SparseJoinWithSeparator, 3, 1) \
626 F(StringToArray, 2, 1) \ 619 F(StringToArray, 2, 1) \
627 F(StringToLowerCase, 1, 1) \ 620 F(StringToLowerCase, 1, 1) \
628 F(StringToUpperCase, 1, 1) \ 621 F(StringToUpperCase, 1, 1) \
629 F(StringTrim, 3, 1) \ 622 F(StringTrim, 3, 1) \
630 F(TruncateString, 2, 1) \ 623 F(TruncateString, 2, 1) \
631 F(NewString, 2, 1) \ 624 F(NewString, 2, 1) \
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 inline bool Runtime::AtomicIsLockFree(uint32_t size) { 1002 inline bool Runtime::AtomicIsLockFree(uint32_t size) {
1010 return size == 1 || size == 2 || size == 4; 1003 return size == 1 || size == 2 || size == 4;
1011 } 1004 }
1012 1005
1013 #endif 1006 #endif
1014 1007
1015 } // namespace internal 1008 } // namespace internal
1016 } // namespace v8 1009 } // namespace v8
1017 1010
1018 #endif // V8_RUNTIME_RUNTIME_H_ 1011 #endif // V8_RUNTIME_RUNTIME_H_
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/runtime/runtime-maths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698