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

Side by Side Diff: src/runtime.js

Issue 8733: Merged bleeding_edge r599:645 into regexp2000. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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/runtime.cc ('k') | src/simulator-arm.h » ('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 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } else if (IS_BOOLEAN(x)) { 71 } else if (IS_BOOLEAN(x)) {
72 if (IS_BOOLEAN(y)) { 72 if (IS_BOOLEAN(y)) {
73 return %_ObjectEquals(x, y) ? 0 : 1; 73 return %_ObjectEquals(x, y) ? 0 : 1;
74 } 74 }
75 if (y == null) return 1; // not equal 75 if (y == null) return 1; // not equal
76 return %NumberEquals(%ToNumber(x), %ToNumber(y)); 76 return %NumberEquals(%ToNumber(x), %ToNumber(y));
77 } else if (x == null) { 77 } else if (x == null) {
78 // NOTE: This checks for both null and undefined. 78 // NOTE: This checks for both null and undefined.
79 return (y == null) ? 0 : 1; 79 return (y == null) ? 0 : 1;
80 } else { 80 } else {
81 // x is not a number, boolean, null or undefined.
82 if (y == null) return 1; // not equal
81 if (IS_OBJECT(y)) { 83 if (IS_OBJECT(y)) {
82 return %_ObjectEquals(x, y) ? 0 : 1; 84 return %_ObjectEquals(x, y) ? 0 : 1;
83 } 85 }
84 if (IS_FUNCTION(y)) { 86 if (IS_FUNCTION(y)) {
85 return %_ObjectEquals(x, y) ? 0 : 1; 87 return %_ObjectEquals(x, y) ? 0 : 1;
86 } 88 }
89
87 x = %ToPrimitive(x, NO_HINT); 90 x = %ToPrimitive(x, NO_HINT);
88 } 91 }
89 } 92 }
90 } 93 }
91 94
92 // ECMA-262, section 11.9.4, page 56. 95 // ECMA-262, section 11.9.4, page 56.
93 function STRICT_EQUALS(x) { 96 function STRICT_EQUALS(x) {
94 if (IS_STRING(this)) { 97 if (IS_STRING(this)) {
95 if (!IS_STRING(x)) return 1; // not equal 98 if (!IS_STRING(x)) return 1; // not equal
96 return %StringEquals(this, x); 99 return %StringEquals(this, x);
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 throw %MakeTypeError('cannot_convert_to_primitive', []); 518 throw %MakeTypeError('cannot_convert_to_primitive', []);
516 } 519 }
517 520
518 521
519 // NOTE: Setting the prototype for Array must take place as early as 522 // NOTE: Setting the prototype for Array must take place as early as
520 // possible due to code generation for array literals. When 523 // possible due to code generation for array literals. When
521 // generating code for a array literal a boilerplate array is created 524 // generating code for a array literal a boilerplate array is created
522 // that is cloned when running the code. It is essiential that the 525 // that is cloned when running the code. It is essiential that the
523 // boilerplate gets the right prototype. 526 // boilerplate gets the right prototype.
524 %FunctionSetPrototype($Array, new $Array(0)); 527 %FunctionSetPrototype($Array, new $Array(0));
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698