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

Side by Side Diff: src/mips/builtins-mips.cc

Issue 12447009: MIPS: ES6 symbols: Implement Symbol intrinsic and basic functionality (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « no previous file | src/mips/code-stubs-mips.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 // 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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1065
1066 // If the result is a smi, it is *not* an object in the ECMA sense. 1066 // If the result is a smi, it is *not* an object in the ECMA sense.
1067 // v0: result 1067 // v0: result
1068 // sp[0]: receiver (newly allocated object) 1068 // sp[0]: receiver (newly allocated object)
1069 // sp[1]: constructor function 1069 // sp[1]: constructor function
1070 // sp[2]: number of arguments (smi-tagged) 1070 // sp[2]: number of arguments (smi-tagged)
1071 __ JumpIfSmi(v0, &use_receiver); 1071 __ JumpIfSmi(v0, &use_receiver);
1072 1072
1073 // If the type of the result (stored in its map) is less than 1073 // If the type of the result (stored in its map) is less than
1074 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense. 1074 // FIRST_SPEC_OBJECT_TYPE, it is not an object in the ECMA sense.
1075 __ GetObjectType(v0, a3, a3); 1075 __ GetObjectType(v0, a1, a3);
1076 __ Branch(&exit, greater_equal, a3, Operand(FIRST_SPEC_OBJECT_TYPE)); 1076 __ Branch(&exit, greater_equal, a3, Operand(FIRST_SPEC_OBJECT_TYPE));
1077 1077
1078 // Symbols are "objects".
1079 __ lbu(a3, FieldMemOperand(a1, Map::kInstanceTypeOffset));
1080 __ Branch(&exit, eq, a3, Operand(SYMBOL_TYPE));
1081
1078 // Throw away the result of the constructor invocation and use the 1082 // Throw away the result of the constructor invocation and use the
1079 // on-stack receiver as the result. 1083 // on-stack receiver as the result.
1080 __ bind(&use_receiver); 1084 __ bind(&use_receiver);
1081 __ lw(v0, MemOperand(sp)); 1085 __ lw(v0, MemOperand(sp));
1082 1086
1083 // Remove receiver from the stack, remove caller arguments, and 1087 // Remove receiver from the stack, remove caller arguments, and
1084 // return. 1088 // return.
1085 __ bind(&exit); 1089 __ bind(&exit);
1086 // v0: result 1090 // v0: result
1087 // sp[0]: receiver (newly allocated object) 1091 // sp[0]: receiver (newly allocated object)
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 __ bind(&dont_adapt_arguments); 1900 __ bind(&dont_adapt_arguments);
1897 __ Jump(a3); 1901 __ Jump(a3);
1898 } 1902 }
1899 1903
1900 1904
1901 #undef __ 1905 #undef __
1902 1906
1903 } } // namespace v8::internal 1907 } } // namespace v8::internal
1904 1908
1905 #endif // V8_TARGET_ARCH_MIPS 1909 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698