OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 * Allocate a transient handle id for this object. Transient handles are | 404 * Allocate a transient handle id for this object. Transient handles are |
405 * negative. | 405 * negative. |
406 */ | 406 */ |
407 Mirror.prototype.allocateTransientHandle_ = function() { | 407 Mirror.prototype.allocateTransientHandle_ = function() { |
408 this.handle_ = next_transient_handle_--; | 408 this.handle_ = next_transient_handle_--; |
409 } | 409 } |
410 | 410 |
411 | 411 |
412 Mirror.prototype.toText = function() { | 412 Mirror.prototype.toText = function() { |
413 // Simpel to text which is used when on specialization in subclass. | 413 // Simpel to text which is used when on specialization in subclass. |
414 return "#<" + builtins.GetInstanceName(this.constructor.name) + ">"; | 414 return "#<" + this.constructor.name + ">"; |
415 } | 415 } |
416 | 416 |
417 | 417 |
418 /** | 418 /** |
419 * Base class for all value mirror objects. | 419 * Base class for all value mirror objects. |
420 * @param {string} type The type of the mirror | 420 * @param {string} type The type of the mirror |
421 * @param {value} value The value reflected by this mirror | 421 * @param {value} value The value reflected by this mirror |
422 * @param {boolean} transient indicate whether this object is transient with a | 422 * @param {boolean} transient indicate whether this object is transient with a |
423 * transient handle | 423 * transient handle |
424 * @constructor | 424 * @constructor |
425 * @extends Mirror | 425 * @extends Mirror |
426 */ | 426 */ |
427 function ValueMirror(type, value, transient) { | 427 function ValueMirror(type, value, transient) { |
428 Mirror.call(this, type); | 428 %_CallFunction(this, type, Mirror); |
429 this.value_ = value; | 429 this.value_ = value; |
430 if (!transient) { | 430 if (!transient) { |
431 this.allocateHandle_(); | 431 this.allocateHandle_(); |
432 } else { | 432 } else { |
433 this.allocateTransientHandle_(); | 433 this.allocateTransientHandle_(); |
434 } | 434 } |
435 } | 435 } |
436 inherits(ValueMirror, Mirror); | 436 inherits(ValueMirror, Mirror); |
437 | 437 |
438 | 438 |
(...skipping 24 matching lines...) Expand all Loading... |
463 return this.value_; | 463 return this.value_; |
464 }; | 464 }; |
465 | 465 |
466 | 466 |
467 /** | 467 /** |
468 * Mirror object for Undefined. | 468 * Mirror object for Undefined. |
469 * @constructor | 469 * @constructor |
470 * @extends ValueMirror | 470 * @extends ValueMirror |
471 */ | 471 */ |
472 function UndefinedMirror() { | 472 function UndefinedMirror() { |
473 ValueMirror.call(this, UNDEFINED_TYPE, void 0); | 473 %_CallFunction(this, UNDEFINED_TYPE, void 0, ValueMirror); |
474 } | 474 } |
475 inherits(UndefinedMirror, ValueMirror); | 475 inherits(UndefinedMirror, ValueMirror); |
476 | 476 |
477 | 477 |
478 UndefinedMirror.prototype.toText = function() { | 478 UndefinedMirror.prototype.toText = function() { |
479 return 'undefined'; | 479 return 'undefined'; |
480 } | 480 } |
481 | 481 |
482 | 482 |
483 /** | 483 /** |
484 * Mirror object for null. | 484 * Mirror object for null. |
485 * @constructor | 485 * @constructor |
486 * @extends ValueMirror | 486 * @extends ValueMirror |
487 */ | 487 */ |
488 function NullMirror() { | 488 function NullMirror() { |
489 ValueMirror.call(this, NULL_TYPE, null); | 489 %_CallFunction(this, NULL_TYPE, null, ValueMirror); |
490 } | 490 } |
491 inherits(NullMirror, ValueMirror); | 491 inherits(NullMirror, ValueMirror); |
492 | 492 |
493 | 493 |
494 NullMirror.prototype.toText = function() { | 494 NullMirror.prototype.toText = function() { |
495 return 'null'; | 495 return 'null'; |
496 } | 496 } |
497 | 497 |
498 | 498 |
499 /** | 499 /** |
500 * Mirror object for boolean values. | 500 * Mirror object for boolean values. |
501 * @param {boolean} value The boolean value reflected by this mirror | 501 * @param {boolean} value The boolean value reflected by this mirror |
502 * @constructor | 502 * @constructor |
503 * @extends ValueMirror | 503 * @extends ValueMirror |
504 */ | 504 */ |
505 function BooleanMirror(value) { | 505 function BooleanMirror(value) { |
506 ValueMirror.call(this, BOOLEAN_TYPE, value); | 506 %_CallFunction(this, BOOLEAN_TYPE, value, ValueMirror); |
507 } | 507 } |
508 inherits(BooleanMirror, ValueMirror); | 508 inherits(BooleanMirror, ValueMirror); |
509 | 509 |
510 | 510 |
511 BooleanMirror.prototype.toText = function() { | 511 BooleanMirror.prototype.toText = function() { |
512 return this.value_ ? 'true' : 'false'; | 512 return this.value_ ? 'true' : 'false'; |
513 } | 513 } |
514 | 514 |
515 | 515 |
516 /** | 516 /** |
517 * Mirror object for number values. | 517 * Mirror object for number values. |
518 * @param {number} value The number value reflected by this mirror | 518 * @param {number} value The number value reflected by this mirror |
519 * @constructor | 519 * @constructor |
520 * @extends ValueMirror | 520 * @extends ValueMirror |
521 */ | 521 */ |
522 function NumberMirror(value) { | 522 function NumberMirror(value) { |
523 ValueMirror.call(this, NUMBER_TYPE, value); | 523 %_CallFunction(this, NUMBER_TYPE, value, ValueMirror); |
524 } | 524 } |
525 inherits(NumberMirror, ValueMirror); | 525 inherits(NumberMirror, ValueMirror); |
526 | 526 |
527 | 527 |
528 NumberMirror.prototype.toText = function() { | 528 NumberMirror.prototype.toText = function() { |
529 return %NumberToString(this.value_); | 529 return %NumberToString(this.value_); |
530 } | 530 } |
531 | 531 |
532 | 532 |
533 /** | 533 /** |
534 * Mirror object for string values. | 534 * Mirror object for string values. |
535 * @param {string} value The string value reflected by this mirror | 535 * @param {string} value The string value reflected by this mirror |
536 * @constructor | 536 * @constructor |
537 * @extends ValueMirror | 537 * @extends ValueMirror |
538 */ | 538 */ |
539 function StringMirror(value) { | 539 function StringMirror(value) { |
540 ValueMirror.call(this, STRING_TYPE, value); | 540 %_CallFunction(this, STRING_TYPE, value, ValueMirror); |
541 } | 541 } |
542 inherits(StringMirror, ValueMirror); | 542 inherits(StringMirror, ValueMirror); |
543 | 543 |
544 | 544 |
545 StringMirror.prototype.length = function() { | 545 StringMirror.prototype.length = function() { |
546 return this.value_.length; | 546 return this.value_.length; |
547 }; | 547 }; |
548 | 548 |
549 StringMirror.prototype.getTruncatedValue = function(maxLength) { | 549 StringMirror.prototype.getTruncatedValue = function(maxLength) { |
550 if (maxLength != -1 && this.length() > maxLength) { | 550 if (maxLength != -1 && this.length() > maxLength) { |
(...skipping 10 matching lines...) Expand all Loading... |
561 | 561 |
562 /** | 562 /** |
563 * Mirror object for objects. | 563 * Mirror object for objects. |
564 * @param {object} value The object reflected by this mirror | 564 * @param {object} value The object reflected by this mirror |
565 * @param {boolean} transient indicate whether this object is transient with a | 565 * @param {boolean} transient indicate whether this object is transient with a |
566 * transient handle | 566 * transient handle |
567 * @constructor | 567 * @constructor |
568 * @extends ValueMirror | 568 * @extends ValueMirror |
569 */ | 569 */ |
570 function ObjectMirror(value, type, transient) { | 570 function ObjectMirror(value, type, transient) { |
571 ValueMirror.call(this, type || OBJECT_TYPE, value, transient); | 571 %_CallFunction(this, type || OBJECT_TYPE, value, transient, ValueMirror); |
572 } | 572 } |
573 inherits(ObjectMirror, ValueMirror); | 573 inherits(ObjectMirror, ValueMirror); |
574 | 574 |
575 | 575 |
576 ObjectMirror.prototype.className = function() { | 576 ObjectMirror.prototype.className = function() { |
577 return %_ClassOf(this.value_); | 577 return %_ClassOf(this.value_); |
578 }; | 578 }; |
579 | 579 |
580 | 580 |
581 ObjectMirror.prototype.constructorFunction = function() { | 581 ObjectMirror.prototype.constructorFunction = function() { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 var name; | 760 var name; |
761 var ctor = this.constructorFunction(); | 761 var ctor = this.constructorFunction(); |
762 if (!ctor.isFunction()) { | 762 if (!ctor.isFunction()) { |
763 name = this.className(); | 763 name = this.className(); |
764 } else { | 764 } else { |
765 name = ctor.name(); | 765 name = ctor.name(); |
766 if (!name) { | 766 if (!name) { |
767 name = this.className(); | 767 name = this.className(); |
768 } | 768 } |
769 } | 769 } |
770 return '#<' + builtins.GetInstanceName(name) + '>'; | 770 return '#<' + name + '>'; |
771 }; | 771 }; |
772 | 772 |
773 | 773 |
774 /** | 774 /** |
775 * Mirror object for functions. | 775 * Mirror object for functions. |
776 * @param {function} value The function object reflected by this mirror. | 776 * @param {function} value The function object reflected by this mirror. |
777 * @constructor | 777 * @constructor |
778 * @extends ObjectMirror | 778 * @extends ObjectMirror |
779 */ | 779 */ |
780 function FunctionMirror(value) { | 780 function FunctionMirror(value) { |
781 ObjectMirror.call(this, value, FUNCTION_TYPE); | 781 %_CallFunction(this, value, FUNCTION_TYPE, ObjectMirror); |
782 this.resolved_ = true; | 782 this.resolved_ = true; |
783 } | 783 } |
784 inherits(FunctionMirror, ObjectMirror); | 784 inherits(FunctionMirror, ObjectMirror); |
785 | 785 |
786 | 786 |
787 /** | 787 /** |
788 * Returns whether the function is resolved. | 788 * Returns whether the function is resolved. |
789 * @return {boolean} True if the function is resolved. Unresolved functions can | 789 * @return {boolean} True if the function is resolved. Unresolved functions can |
790 * only originate as functions from stack frames | 790 * only originate as functions from stack frames |
791 */ | 791 */ |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 /** | 901 /** |
902 * Mirror object for unresolved functions. | 902 * Mirror object for unresolved functions. |
903 * @param {string} value The name for the unresolved function reflected by this | 903 * @param {string} value The name for the unresolved function reflected by this |
904 * mirror. | 904 * mirror. |
905 * @constructor | 905 * @constructor |
906 * @extends ObjectMirror | 906 * @extends ObjectMirror |
907 */ | 907 */ |
908 function UnresolvedFunctionMirror(value) { | 908 function UnresolvedFunctionMirror(value) { |
909 // Construct this using the ValueMirror as an unresolved function is not a | 909 // Construct this using the ValueMirror as an unresolved function is not a |
910 // real object but just a string. | 910 // real object but just a string. |
911 ValueMirror.call(this, FUNCTION_TYPE, value); | 911 %_CallFunction(this, FUNCTION_TYPE, value, ValueMirror); |
912 this.propertyCount_ = 0; | 912 this.propertyCount_ = 0; |
913 this.elementCount_ = 0; | 913 this.elementCount_ = 0; |
914 this.resolved_ = false; | 914 this.resolved_ = false; |
915 } | 915 } |
916 inherits(UnresolvedFunctionMirror, FunctionMirror); | 916 inherits(UnresolvedFunctionMirror, FunctionMirror); |
917 | 917 |
918 | 918 |
919 UnresolvedFunctionMirror.prototype.className = function() { | 919 UnresolvedFunctionMirror.prototype.className = function() { |
920 return 'Function'; | 920 return 'Function'; |
921 }; | 921 }; |
(...skipping 29 matching lines...) Expand all Loading... |
951 } | 951 } |
952 | 952 |
953 | 953 |
954 /** | 954 /** |
955 * Mirror object for arrays. | 955 * Mirror object for arrays. |
956 * @param {Array} value The Array object reflected by this mirror | 956 * @param {Array} value The Array object reflected by this mirror |
957 * @constructor | 957 * @constructor |
958 * @extends ObjectMirror | 958 * @extends ObjectMirror |
959 */ | 959 */ |
960 function ArrayMirror(value) { | 960 function ArrayMirror(value) { |
961 ObjectMirror.call(this, value); | 961 %_CallFunction(this, value, ObjectMirror); |
962 } | 962 } |
963 inherits(ArrayMirror, ObjectMirror); | 963 inherits(ArrayMirror, ObjectMirror); |
964 | 964 |
965 | 965 |
966 ArrayMirror.prototype.length = function() { | 966 ArrayMirror.prototype.length = function() { |
967 return this.value_.length; | 967 return this.value_.length; |
968 }; | 968 }; |
969 | 969 |
970 | 970 |
971 ArrayMirror.prototype.indexedPropertiesFromRange = function(opt_from_index, opt_
to_index) { | 971 ArrayMirror.prototype.indexedPropertiesFromRange = function(opt_from_index, opt_
to_index) { |
(...skipping 15 matching lines...) Expand all Loading... |
987 } | 987 } |
988 | 988 |
989 | 989 |
990 /** | 990 /** |
991 * Mirror object for dates. | 991 * Mirror object for dates. |
992 * @param {Date} value The Date object reflected by this mirror | 992 * @param {Date} value The Date object reflected by this mirror |
993 * @constructor | 993 * @constructor |
994 * @extends ObjectMirror | 994 * @extends ObjectMirror |
995 */ | 995 */ |
996 function DateMirror(value) { | 996 function DateMirror(value) { |
997 ObjectMirror.call(this, value); | 997 %_CallFunction(this, value, ObjectMirror); |
998 } | 998 } |
999 inherits(DateMirror, ObjectMirror); | 999 inherits(DateMirror, ObjectMirror); |
1000 | 1000 |
1001 | 1001 |
1002 DateMirror.prototype.toText = function() { | 1002 DateMirror.prototype.toText = function() { |
1003 var s = JSON.stringify(this.value_); | 1003 var s = JSON.stringify(this.value_); |
1004 return s.substring(1, s.length - 1); // cut quotes | 1004 return s.substring(1, s.length - 1); // cut quotes |
1005 } | 1005 } |
1006 | 1006 |
1007 | 1007 |
1008 /** | 1008 /** |
1009 * Mirror object for regular expressions. | 1009 * Mirror object for regular expressions. |
1010 * @param {RegExp} value The RegExp object reflected by this mirror | 1010 * @param {RegExp} value The RegExp object reflected by this mirror |
1011 * @constructor | 1011 * @constructor |
1012 * @extends ObjectMirror | 1012 * @extends ObjectMirror |
1013 */ | 1013 */ |
1014 function RegExpMirror(value) { | 1014 function RegExpMirror(value) { |
1015 ObjectMirror.call(this, value, REGEXP_TYPE); | 1015 %_CallFunction(this, value, REGEXP_TYPE, ObjectMirror); |
1016 } | 1016 } |
1017 inherits(RegExpMirror, ObjectMirror); | 1017 inherits(RegExpMirror, ObjectMirror); |
1018 | 1018 |
1019 | 1019 |
1020 /** | 1020 /** |
1021 * Returns the source to the regular expression. | 1021 * Returns the source to the regular expression. |
1022 * @return {string or undefined} The source to the regular expression | 1022 * @return {string or undefined} The source to the regular expression |
1023 */ | 1023 */ |
1024 RegExpMirror.prototype.source = function() { | 1024 RegExpMirror.prototype.source = function() { |
1025 return this.value_.source; | 1025 return this.value_.source; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 } | 1059 } |
1060 | 1060 |
1061 | 1061 |
1062 /** | 1062 /** |
1063 * Mirror object for error objects. | 1063 * Mirror object for error objects. |
1064 * @param {Error} value The error object reflected by this mirror | 1064 * @param {Error} value The error object reflected by this mirror |
1065 * @constructor | 1065 * @constructor |
1066 * @extends ObjectMirror | 1066 * @extends ObjectMirror |
1067 */ | 1067 */ |
1068 function ErrorMirror(value) { | 1068 function ErrorMirror(value) { |
1069 ObjectMirror.call(this, value, ERROR_TYPE); | 1069 %_CallFunction(this, value, ERROR_TYPE, ObjectMirror); |
1070 } | 1070 } |
1071 inherits(ErrorMirror, ObjectMirror); | 1071 inherits(ErrorMirror, ObjectMirror); |
1072 | 1072 |
1073 | 1073 |
1074 /** | 1074 /** |
1075 * Returns the message for this eror object. | 1075 * Returns the message for this eror object. |
1076 * @return {string or undefined} The message for this eror object | 1076 * @return {string or undefined} The message for this eror object |
1077 */ | 1077 */ |
1078 ErrorMirror.prototype.message = function() { | 1078 ErrorMirror.prototype.message = function() { |
1079 return this.value_.message; | 1079 return this.value_.message; |
(...skipping 14 matching lines...) Expand all Loading... |
1094 | 1094 |
1095 /** | 1095 /** |
1096 * Base mirror object for properties. | 1096 * Base mirror object for properties. |
1097 * @param {ObjectMirror} mirror The mirror object having this property | 1097 * @param {ObjectMirror} mirror The mirror object having this property |
1098 * @param {string} name The name of the property | 1098 * @param {string} name The name of the property |
1099 * @param {Array} details Details about the property | 1099 * @param {Array} details Details about the property |
1100 * @constructor | 1100 * @constructor |
1101 * @extends Mirror | 1101 * @extends Mirror |
1102 */ | 1102 */ |
1103 function PropertyMirror(mirror, name, details) { | 1103 function PropertyMirror(mirror, name, details) { |
1104 Mirror.call(this, PROPERTY_TYPE); | 1104 %_CallFunction(this, PROPERTY_TYPE, Mirror); |
1105 this.mirror_ = mirror; | 1105 this.mirror_ = mirror; |
1106 this.name_ = name; | 1106 this.name_ = name; |
1107 this.value_ = details[0]; | 1107 this.value_ = details[0]; |
1108 this.details_ = details[1]; | 1108 this.details_ = details[1]; |
1109 if (details.length > 2) { | 1109 if (details.length > 2) { |
1110 this.exception_ = details[2] | 1110 this.exception_ = details[2] |
1111 this.getter_ = details[3]; | 1111 this.getter_ = details[3]; |
1112 this.setter_ = details[4]; | 1112 this.setter_ = details[4]; |
1113 } | 1113 } |
1114 } | 1114 } |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 | 1390 |
1391 /** | 1391 /** |
1392 * Mirror object for stack frames. | 1392 * Mirror object for stack frames. |
1393 * @param {number} break_id The break id in the VM for which this frame is | 1393 * @param {number} break_id The break id in the VM for which this frame is |
1394 valid | 1394 valid |
1395 * @param {number} index The frame index (top frame is index 0) | 1395 * @param {number} index The frame index (top frame is index 0) |
1396 * @constructor | 1396 * @constructor |
1397 * @extends Mirror | 1397 * @extends Mirror |
1398 */ | 1398 */ |
1399 function FrameMirror(break_id, index) { | 1399 function FrameMirror(break_id, index) { |
1400 Mirror.call(this, FRAME_TYPE); | 1400 %_CallFunction(this, FRAME_TYPE, Mirror); |
1401 this.break_id_ = break_id; | 1401 this.break_id_ = break_id; |
1402 this.index_ = index; | 1402 this.index_ = index; |
1403 this.details_ = new FrameDetails(break_id, index); | 1403 this.details_ = new FrameDetails(break_id, index); |
1404 } | 1404 } |
1405 inherits(FrameMirror, Mirror); | 1405 inherits(FrameMirror, Mirror); |
1406 | 1406 |
1407 | 1407 |
1408 FrameMirror.prototype.index = function() { | 1408 FrameMirror.prototype.index = function() { |
1409 return this.index_; | 1409 return this.index_; |
1410 }; | 1410 }; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 | 1705 |
1706 | 1706 |
1707 /** | 1707 /** |
1708 * Mirror object for scope. | 1708 * Mirror object for scope. |
1709 * @param {FrameMirror} frame The frame this scope is a part of | 1709 * @param {FrameMirror} frame The frame this scope is a part of |
1710 * @param {number} index The scope index in the frame | 1710 * @param {number} index The scope index in the frame |
1711 * @constructor | 1711 * @constructor |
1712 * @extends Mirror | 1712 * @extends Mirror |
1713 */ | 1713 */ |
1714 function ScopeMirror(frame, index) { | 1714 function ScopeMirror(frame, index) { |
1715 Mirror.call(this, SCOPE_TYPE); | 1715 %_CallFunction(this, SCOPE_TYPE, Mirror); |
1716 this.frame_index_ = frame.index_; | 1716 this.frame_index_ = frame.index_; |
1717 this.scope_index_ = index; | 1717 this.scope_index_ = index; |
1718 this.details_ = new ScopeDetails(frame, index); | 1718 this.details_ = new ScopeDetails(frame, index); |
1719 } | 1719 } |
1720 inherits(ScopeMirror, Mirror); | 1720 inherits(ScopeMirror, Mirror); |
1721 | 1721 |
1722 | 1722 |
1723 ScopeMirror.prototype.frameIndex = function() { | 1723 ScopeMirror.prototype.frameIndex = function() { |
1724 return this.frame_index_; | 1724 return this.frame_index_; |
1725 }; | 1725 }; |
(...skipping 19 matching lines...) Expand all Loading... |
1745 }; | 1745 }; |
1746 | 1746 |
1747 | 1747 |
1748 /** | 1748 /** |
1749 * Mirror object for script source. | 1749 * Mirror object for script source. |
1750 * @param {Script} script The script object | 1750 * @param {Script} script The script object |
1751 * @constructor | 1751 * @constructor |
1752 * @extends Mirror | 1752 * @extends Mirror |
1753 */ | 1753 */ |
1754 function ScriptMirror(script) { | 1754 function ScriptMirror(script) { |
1755 Mirror.call(this, SCRIPT_TYPE); | 1755 %_CallFunction(this, SCRIPT_TYPE, Mirror); |
1756 this.script_ = script; | 1756 this.script_ = script; |
1757 this.context_ = new ContextMirror(script.context_data); | 1757 this.context_ = new ContextMirror(script.context_data); |
1758 this.allocateHandle_(); | 1758 this.allocateHandle_(); |
1759 } | 1759 } |
1760 inherits(ScriptMirror, Mirror); | 1760 inherits(ScriptMirror, Mirror); |
1761 | 1761 |
1762 | 1762 |
1763 ScriptMirror.prototype.value = function() { | 1763 ScriptMirror.prototype.value = function() { |
1764 return this.script_; | 1764 return this.script_; |
1765 }; | 1765 }; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1861 } | 1861 } |
1862 | 1862 |
1863 | 1863 |
1864 /** | 1864 /** |
1865 * Mirror object for context. | 1865 * Mirror object for context. |
1866 * @param {Object} data The context data | 1866 * @param {Object} data The context data |
1867 * @constructor | 1867 * @constructor |
1868 * @extends Mirror | 1868 * @extends Mirror |
1869 */ | 1869 */ |
1870 function ContextMirror(data) { | 1870 function ContextMirror(data) { |
1871 Mirror.call(this, CONTEXT_TYPE); | 1871 %_CallFunction(this, CONTEXT_TYPE, Mirror); |
1872 this.data_ = data; | 1872 this.data_ = data; |
1873 this.allocateHandle_(); | 1873 this.allocateHandle_(); |
1874 } | 1874 } |
1875 inherits(ContextMirror, Mirror); | 1875 inherits(ContextMirror, Mirror); |
1876 | 1876 |
1877 | 1877 |
1878 ContextMirror.prototype.data = function() { | 1878 ContextMirror.prototype.data = function() { |
1879 return this.data_; | 1879 return this.data_; |
1880 }; | 1880 }; |
1881 | 1881 |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2371 } | 2371 } |
2372 if (!NUMBER_IS_FINITE(value)) { | 2372 if (!NUMBER_IS_FINITE(value)) { |
2373 if (value > 0) { | 2373 if (value > 0) { |
2374 return 'Infinity'; | 2374 return 'Infinity'; |
2375 } else { | 2375 } else { |
2376 return '-Infinity'; | 2376 return '-Infinity'; |
2377 } | 2377 } |
2378 } | 2378 } |
2379 return value; | 2379 return value; |
2380 } | 2380 } |
OLD | NEW |