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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 3117006: Handle overwriting valueOf on String objects correctly when adding... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); 1952 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
1953 __ ldrb(r1, FieldMemOperand(r1, Map::kBitFieldOffset)); 1953 __ ldrb(r1, FieldMemOperand(r1, Map::kBitFieldOffset));
1954 __ tst(r1, Operand(1 << Map::kIsUndetectable)); 1954 __ tst(r1, Operand(1 << Map::kIsUndetectable));
1955 __ b(ne, if_true); 1955 __ b(ne, if_true);
1956 __ b(if_false); 1956 __ b(if_false);
1957 1957
1958 Apply(context_, if_true, if_false); 1958 Apply(context_, if_true, if_false);
1959 } 1959 }
1960 1960
1961 1961
1962 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
1963 ZoneList<Expression*>* args) {
1964
1965 ASSERT(args->length() == 1);
1966
1967 VisitForValue(args->at(0), kAccumulator);
1968
1969 Label materialize_true, materialize_false;
1970 Label* if_true = NULL;
1971 Label* if_false = NULL;
1972 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
1973
1974 // Just indicate false, as %_IsStringWrapperSafeForDefaultValueOf() is only
1975 // used in a few functions in runtime.js which should not normally be hit by
1976 // this compiler.
1977 __ jmp(if_false);
1978 Apply(context_, if_true, if_false);
1979 }
1980
1981
1962 void FullCodeGenerator::EmitIsFunction(ZoneList<Expression*>* args) { 1982 void FullCodeGenerator::EmitIsFunction(ZoneList<Expression*>* args) {
1963 ASSERT(args->length() == 1); 1983 ASSERT(args->length() == 1);
1964 1984
1965 VisitForValue(args->at(0), kAccumulator); 1985 VisitForValue(args->at(0), kAccumulator);
1966 1986
1967 Label materialize_true, materialize_false; 1987 Label materialize_true, materialize_false;
1968 Label* if_true = NULL; 1988 Label* if_true = NULL;
1969 Label* if_false = NULL; 1989 Label* if_false = NULL;
1970 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false); 1990 PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
1971 1991
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
3221 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3241 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3222 __ add(pc, r1, Operand(masm_->CodeObject())); 3242 __ add(pc, r1, Operand(masm_->CodeObject()));
3223 } 3243 }
3224 3244
3225 3245
3226 #undef __ 3246 #undef __
3227 3247
3228 } } // namespace v8::internal 3248 } } // namespace v8::internal
3229 3249
3230 #endif // V8_TARGET_ARCH_ARM 3250 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698