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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 | 880 |
881 | 881 |
882 class GetPropertyStub : public CodeStub { | 882 class GetPropertyStub : public CodeStub { |
883 public: | 883 public: |
884 GetPropertyStub() { } | 884 GetPropertyStub() { } |
885 | 885 |
886 private: | 886 private: |
887 Major MajorKey() { return GetProperty; } | 887 Major MajorKey() { return GetProperty; } |
888 int MinorKey() { return 0; } | 888 int MinorKey() { return 0; } |
889 void Generate(MacroAssembler* masm); | 889 void Generate(MacroAssembler* masm); |
890 | |
891 const char* GetName() { return "GetPropertyStub"; } | |
892 }; | 890 }; |
893 | 891 |
894 | 892 |
895 class SetPropertyStub : public CodeStub { | 893 class SetPropertyStub : public CodeStub { |
896 public: | 894 public: |
897 SetPropertyStub() { } | 895 SetPropertyStub() { } |
898 | 896 |
899 private: | 897 private: |
900 Major MajorKey() { return SetProperty; } | 898 Major MajorKey() { return SetProperty; } |
901 int MinorKey() { return 0; } | 899 int MinorKey() { return 0; } |
902 void Generate(MacroAssembler* masm); | 900 void Generate(MacroAssembler* masm); |
903 | |
904 const char* GetName() { return "GetPropertyStub"; } | |
905 }; | 901 }; |
906 | 902 |
907 | 903 |
908 class GenericBinaryOpStub : public CodeStub { | 904 class GenericBinaryOpStub : public CodeStub { |
909 public: | 905 public: |
910 explicit GenericBinaryOpStub(Token::Value op) : op_(op) { } | 906 explicit GenericBinaryOpStub(Token::Value op) : op_(op) { } |
911 | 907 |
912 private: | 908 private: |
913 Token::Value op_; | 909 Token::Value op_; |
914 | 910 |
(...skipping 29 matching lines...) Expand all Loading... |
944 InvokeBuiltinStub(Kind kind, int argc) : kind_(kind), argc_(argc) { } | 940 InvokeBuiltinStub(Kind kind, int argc) : kind_(kind), argc_(argc) { } |
945 | 941 |
946 private: | 942 private: |
947 Kind kind_; | 943 Kind kind_; |
948 int argc_; | 944 int argc_; |
949 | 945 |
950 Major MajorKey() { return InvokeBuiltin; } | 946 Major MajorKey() { return InvokeBuiltin; } |
951 int MinorKey() { return (argc_ << 3) | static_cast<int>(kind_); } | 947 int MinorKey() { return (argc_ << 3) | static_cast<int>(kind_); } |
952 void Generate(MacroAssembler* masm); | 948 void Generate(MacroAssembler* masm); |
953 | 949 |
954 const char* GetName() { return "InvokeBuiltinStub"; } | |
955 | |
956 #ifdef DEBUG | 950 #ifdef DEBUG |
957 void Print() { | 951 void Print() { |
958 PrintF("InvokeBuiltinStub (kind %d, argc, %d)\n", | 952 PrintF("InvokeBuiltinStub (kind %d, argc, %d)\n", |
959 static_cast<int>(kind_), | 953 static_cast<int>(kind_), |
960 argc_); | 954 argc_); |
961 } | 955 } |
962 #endif | 956 #endif |
963 }; | 957 }; |
964 | 958 |
965 | 959 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 | 1281 |
1288 class CallFunctionStub: public CodeStub { | 1282 class CallFunctionStub: public CodeStub { |
1289 public: | 1283 public: |
1290 explicit CallFunctionStub(int argc) : argc_(argc) {} | 1284 explicit CallFunctionStub(int argc) : argc_(argc) {} |
1291 | 1285 |
1292 void Generate(MacroAssembler* masm); | 1286 void Generate(MacroAssembler* masm); |
1293 | 1287 |
1294 private: | 1288 private: |
1295 int argc_; | 1289 int argc_; |
1296 | 1290 |
1297 const char* GetName() { return "CallFuntionStub"; } | |
1298 | |
1299 #if defined(DEBUG) | 1291 #if defined(DEBUG) |
1300 void Print() { PrintF("CallFunctionStub (argc %d)\n", argc_); } | 1292 void Print() { PrintF("CallFunctionStub (argc %d)\n", argc_); } |
1301 #endif // defined(DEBUG) | 1293 #endif // defined(DEBUG) |
1302 | 1294 |
1303 Major MajorKey() { return CallFunction; } | 1295 Major MajorKey() { return CallFunction; } |
1304 int MinorKey() { return argc_; } | 1296 int MinorKey() { return argc_; } |
1305 }; | 1297 }; |
1306 | 1298 |
1307 | 1299 |
1308 // Call the function on the stack with the given arguments. | 1300 // Call the function on the stack with the given arguments. |
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3379 | 3371 |
3380 case Token::IN: | 3372 case Token::IN: |
3381 __ mov(r0, Operand(1)); // not counting receiver | 3373 __ mov(r0, Operand(1)); // not counting receiver |
3382 __ InvokeBuiltin(Builtins::IN, CALL_JS); | 3374 __ InvokeBuiltin(Builtins::IN, CALL_JS); |
3383 __ push(r0); | 3375 __ push(r0); |
3384 break; | 3376 break; |
3385 | 3377 |
3386 case Token::INSTANCEOF: | 3378 case Token::INSTANCEOF: |
3387 __ mov(r0, Operand(1)); // not counting receiver | 3379 __ mov(r0, Operand(1)); // not counting receiver |
3388 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_JS); | 3380 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_JS); |
3389 __ push(r0); | 3381 __ tst(r0, Operand(r0)); |
| 3382 cc_reg_ = eq; |
3390 break; | 3383 break; |
3391 | 3384 |
3392 default: | 3385 default: |
3393 UNREACHABLE(); | 3386 UNREACHABLE(); |
3394 } | 3387 } |
3395 } | 3388 } |
3396 | 3389 |
3397 | 3390 |
3398 void ArmCodeGenerator::RecordStatementPosition(Node* node) { | 3391 void ArmCodeGenerator::RecordStatementPosition(Node* node) { |
3399 if (FLAG_debug_info) { | 3392 if (FLAG_debug_info) { |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4517 bool is_eval) { | 4510 bool is_eval) { |
4518 Handle<Code> code = ArmCodeGenerator::MakeCode(fun, script, is_eval); | 4511 Handle<Code> code = ArmCodeGenerator::MakeCode(fun, script, is_eval); |
4519 if (!code.is_null()) { | 4512 if (!code.is_null()) { |
4520 Counters::total_compiled_code_size.Increment(code->instruction_size()); | 4513 Counters::total_compiled_code_size.Increment(code->instruction_size()); |
4521 } | 4514 } |
4522 return code; | 4515 return code; |
4523 } | 4516 } |
4524 | 4517 |
4525 | 4518 |
4526 } } // namespace v8::internal | 4519 } } // namespace v8::internal |
OLD | NEW |